I'm using Visual Studio Community 2015 to create an MVC application. I previously created one that used Windows Authentication, and in setting IIS Express 10 up for that, it seems to have stopped any sites with no authentication loading up. Instead I get the following error:
HTTP Error 401.2 - Unauthorized
You are not authorized to view this page due to invalid authentication headers.
I've Googled this error, and everything that comes back is for IIS, rather than the express version, which gives you very little in the way of managing it. I've looked in the configuration files in IIS Express and in my user folder for IIS Express, and anonymous authentication is enabled, so I'm really not sure what to do.
I've even tried re-installing IIS Express 10 to no avail, so any help would be appreciated, as I can't run a lot of MVC applications on my local machine at the moment.
I actually ended up solving this myself by finding an answer from an unrelated problem. The anonymous authentication of the project itself was set to false. By enabling that in the properties window (which by default wasn't shown) the application ran again. So the answer to this is check that property is set correctly. I will try Jexus Manager too in the future, as it looks like the console that IIS Express is missing.
Related
I created a new ASP.NET Core MVC project with Visual Studio 2019, using the built in default template. I simply ran the project by clicking the green 'play' arrow where it says "IIS Express" (or by pressing F5). I haven't modified anything, yet when my browser opens up (in this case, Microsoft Edge) I get this:
Can’t connect securely to this page
This might be because the site uses outdated or unsafe TLS security settings. If this keeps happening, try contacting the website’s owner.
Your TLS security settings aren’t set to the defaults, which could also be causing this error.
I've opened a 'ticket' with Microsoft, but haven't heard anything yet. It may be that there is an issue with my IIS Express installation, but I'm not sure how to figure that out. I normally prefer to run my ASP.NET MVC local development from my local IIS, but it seems that IIS Express is the default way for Core MVC.
I modified my install of Visual Studio 2019 by removing all the web (ASP.NET) components, and then modified it again by adding them. After this, the default ASP.NET Core project does indeed work and debug with IIS Express.
I don't know how my install became corrupted, but it must have been from one of the numerous Visual Studio updates that seem to be released every few days.
I just set up my machine to code Windows Azure apps in Visual Studio 2010. I have a machine at work, which works fine. The machines are both 64-bit Windows 7. I run as administator at work. At home I installed most of the VS and .NET components as normal user, but I'm running everything now as administrator, because I assume there could be some errors correlating to that.
Creating a standard Azure project with one web role gives me this:
"there was an error attaching the debugger to the IIS worker process
for URL http://127.0.0.1:5100/ for role instance 'xyz'...".
I searched Google 24 hours and tried most of the solutions, but none worked for me:
repairing .NET 4.0 (I didn't uninstall it prior to reinstalling, but
I will try to do so now)
setting the WebRole as Start Project works fine. It runs the webpage.
<system.web> <compilation debug="true" targetFramework="4.0" /> is set to true ( http://www.google.de/url?sa=t&source=web&cd=4&sqi=2&ved=0CDgQFjAD&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F4541593%2Fazure-error-on-starting-with-multiple-web-role-projects&ei=RAhOTq27Fsv4sgaB_LSVAw&usg=AFQjCNFa6NveaRmUhBtEIus9vwK54VojKA)
there's no httpModules to delete ( http://natacha-huguet-millot.tumblr.com/)
there's only one v4.x directory in Windows\Microsoft.NET\Framework64 ( http://social.technet.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/45e01c3d-7c16-4ca7-999b-46cb20b38c1d#0c118416-484a-413c-bd18-049033b1ccb8)
running aspnet_regiis.exe -r. succeeds but doesn't work ( http://www.dotnetspark.com/kb/3720-error-attaching-debugger-windows-azure-sdk.aspx) neither does rebooting
looking for Visual Studio Web Debugger log shows this (also my section name="httpErrors" overrideModeDefault in IIS is set to Allow; source: http://dunnry.com/blog/2011/07/14/HowToDiagnoseWindowsAzureErrorAttachingDebuggerErrors.aspx):
http://127.0.0.1:5100/debugattach.aspx
Status code=403 (Forbidden) Protocol version=1.1 Cached=False
Content-Length=53 Content-Type=text/html; charset=utf-8
Date=Fri, 19 Aug 2011 20:16:48 GMT Server=Microsoft-IIS/7.5
X-Powered-By=ASP.NET
/debugattach.aspx-application debugging not activated.
When I comment out the Sites-Tag in the ServiceDefinition.csdef I get the following error:
"unrecognized attribute 'targetframework'. note that attribute names
are case-sensitive"
Here I also tried most solutions to be found on the internet:
setting the right .NET-Framework version in IIS-Manager (all application pools are set to 4.0, when starting the project, the error page shows framework 2.0 though, where can I change it?)
installing the newest .NET-Framework, I have 4.0.30319
None of them work.
If you have any advice, I will try it and list my result in this post.
I was getting this due the the properties on the azure project being set up incorrectly.
I had to change the setting from IIS Webserver to IIS Express
The first question to ask is which version of Windows 7 are you running at home? I'm going to go out on a limb and guess that it's Home Premium and at work you run Professional.
The catch is that with Home Premium (an lesser edtions) you don't have the option to install the necessary components to be able to debug in IIS. To confirm this, on your work computer go to Control Panel -> Programs and Features -> "Turn Windows features on or off" and have a look under the IIS option. You'll see more there than you do at home.
I have not found anywhere in the MS documentation on the differences between various editions of Windows 7 that this is the case. I'd be happy for someone to correct me on this though.
To get around this issue is while running at home to change the project to run with Visual Studio Development Server (right click your project -> Properties -> Web) and make sure that you change it back to using IIS before you check in your code.
Or you can buy an anytime upgrade for windows to Professional.
Got the same error and fixed it by changing the defaults for the app-pools in IIS.
Start iis manager
Select application pools
On the right side, in the 'Actions' panel click on 'Set application pool defaults'
Set .NET framework to 4.0
OPTIONAL : Set Enable 32-bit applications to true
This worked for me:
Go to IIS -> default web site -> bindings
Set the default http port back to 80.
Here is my environment
Windows7, Visual Studio 2010, MVC2.0 and NET4
My default web site is configured to use ASP.NET v4.0 application pool.
Here is an easy way to reproduce my problem
Create a new MVC2 application
Open the properties Window
Go to the Web tab
Check "Use IIS Local Web Server"
Click on "Create Virtual Directory" button
I get this error message
To access local IIS Web Sites, you must install the following IIS components:
In addition, you must run visual Studio in the context of an Administrator account
For more information, press F1
Notice the blank line after "...the following IIS components:"
I am running VS2010 as administrator
Pressing F1 does not bring any help
I checked my Windows eventlog files and found that my metabase was corrupted
(I thought we get rid of this in IIS7 but it looks like it is still here...)
I used this Microsoft article to restore it from an old version and now everything is working
Hope this can help somebody else
Have you tried running VS as administrator?
Right click your VS shortcut and select "Run as Administrator"
I had the same error message, in my case with VS2008, Windows 7 + IIS7, when trying to add an existing web site to a solution. I think this is one of those error messages where what it states can be a big red herring, i.e. it doesn't necessarily have anything to do with running as an administrator or not having components installed.
In my case, the web site had an HTTP binding in which the hostname was set to "localhost". Once I cleared that, it worked fine. Don't ask me why I put "localhost" in there, it just seemed to make sense at the time.
My internet hunting also turned up this brief entry, which did not work for me.
I am not able to debug asp.net application in asp.net 2.0
Whenever I hit F5, it will wait for few minutes then show following message.
Unable to start debugging on the web server. The operation has timed out.
Edit: I also want to let you know that before posting this question I searched a lot on google and find out some key points like restart IIS, register asp.net.
What I was doing, I try to register aspnet_regiis -i by using standard console.
Now I find out that I need to execute vc 2005 command prompt which located under visual studio tools.
Have you tried restarting IIS? Also try and run the application again do you still get the error? And the classic, restart of windows.
With Visual Studio errors like this, you'll often find tons of information by searching on Google, as unsatisfactory as that is, problems like this can originate from something as esoteric as a third party software.
Just a suggestion, Is the port used by the Visual Studio Dev Web Server being used by some other Application?
Also try these suggestions.
Yesterday I created a new project in Codeplex. I created a connection from Visual Studio to the TFS server I was assigned and uploaded my solution successfully. Today I'm trying to connect again to the Codeplex TFS server to work on the solution. When I try to open it, I get the error:
Team Foundation Server
https://tfs06.codeplex.com/ does not
exist or is not accessible at this
time.
The remote server returned an error:
(407) Proxy Authentication Required.
The corporate environment I'm using does use proxy authentication but this wasn't an issue yesterday. Any ideas on why it worked then and how to make it work now?
Do you want to try refreshing the start page in Visual Studio (View, Other Windows, Start Page)? Sounds bizarre but the following forum post suggest that this might work...
http://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/c46afd34-09ea-4505-a34e-b378cb35138d
Visiting the Start Page (under View, Other Windows, Start Page) as recommended by Martin seems to reset the proxy authentication in some way.
An authentication prompt will then appear by going to Tools, Connect to Team Foundation Server, and selecting the server from the dropdown. Going to File, Source Control, Go Online then reconnects the solution.