403 Forbidden running MVC3 from VS2010 - visual-studio-2010

I've recently had a name change to my PC and rebooted. Before this change, I could run my MVC3 project from VS2010 using IIS 7. After the name change I getting:
Http Error 403 Forbidden Version Information: ASP.NET Development Server 10.0.0.0
I realise this could be a number of things so I'll try, in detail, to describe what's going on.
IIS
My IIS reverted back to v6 so I loaded 7 and set my DefaultAppPool to use .NET v4.0.
Security has all permissions for my account.
Request Filtering has 'Allow unlisted file name extensions checked (another answer on SO)
I'm using FireFox 24.0
VS2010 hasn't changed as far as I'm aware.
I'm not very familiar with IIS which, seems to me, is my problem so please bear this in mind if you decide to help. I'll gladly provide more information if needed.
thanks,
Paul

Do you actually have IIS7 installed or are you using IIS Express or Cassini?
I'm pretty sure that you'll be able to get things going again if you use the aspnet_regiis command.
Navigate to your .Net folder and run the following command aspnet_regiis -i

This isn't the answer but rather a different question. The problem wasn't IIS, the problem is with FireFox. I changed the default browser to Chrome and my app runs as it should.

Simple answer - I changed windows authentication password which wasn't updated in firefox. I changed the password to be in sync and it solved the issue.

Related

IIS Manager is installed but shows empty page

I hope this is the right place to ask. I was thinking serverfault might not be correct, since the computer in question is not a server. Feel free to migrate if StackOverflow is not right.
I usually install IIS on servers but have installed it on Workstations before. I actually had the same problem with another machine of the same model a few weeks ago but can't remember how I resolved it. I must have installed additional features or run some powershell-command that did not resolve the issue on this machine.
I installed IIS the correct way using the Windows Features, as described in the answers to this question. I've actually removed and reinstalled it since then, but it hasn't resolved my problem.
The WWW publishing service is running and I can open the IIS Manager, but it's completely empty, unlike here where the IIS Manager at least shows the local computer
When I type localhost into a browser I don't see the IIS Startpage, I get the error ERR_CONNECTION_REFUSED
You can see that all the required checkboxes are checked:
And the service seems to be running.
I've since tried installing IIS using
DISM:
Powershell:
And I checked the status using the iisreset command which was mentioned in the comments here (second linked question upstairs):
It restarts without any error and says everything is working fine.
Has anyone ever encountered this before or might know what I could try to get IIS actually working?
Edit:
I just noticed, while trying to uninstall IIS, that I can not uninstall it. I used Windows-Features and confirmed to reboot when prompted, but while rebooting Windows does a rollback and IIS is still available. So I can't even uninstall it.
Also just found this similar quesion on SuperUser. I'm still trying some suggestions there. So far to no avail.
Thanks for the comments.
I was on vacation, but a colleague was able to fix the problem.
Unfortunately, the solution was to reset Windows 11. He was then able to install IIS through Windows Features and it worked.
No idea why it didn't work in the first place, or why it got to this unrecoverable state. But now everything is fine.

Visual Studio 2017 - How to fix error: We could not refresh the credentials for the account

My email address has changed and now I can't log into Visual Studio 2017.
The error is "We could not refresh the credentials for the account. Failed to refresh the access token".
How can I fix this?
This bug will be fixed in a future version.
For now:
Close down VS2017
Go to "C:\Users\{username}\AppData\Local\.IdentityService"
Rename "IdentityServiceAdalCache.cache" as shown below. (for example just add an underscore to it)
Restart VS2017 and log in.
NOTE: There are similar issues that this won't resolve, but this worked for me.
Open Visual Studio. Click Help, Send Feedback, Report a Problem...
This brings you to a login screen. If you log in from there, it will log you into Visual Studio.
What worked for me was to rename .identityservice and then restart VS and log in to your VSTS account. It then recreates a new .identityservice that it can access.
I tried by deleting only the IdentityServiceAdalCache.cache as in the accepted answer but it did not fix the problem.
For the record, I managed to fix it by deleting every files within the .IdentityService folder (located in C:\Users{username}\AppData\Local.IdentityService).
I have read dozens of posts on this topic discussing clearing out .IdentityService. I tried every variation of this solution that one might think of. None worked.
I ended up poking around and trying to manually login to my Microsoft account using Internet Explorer, but I could not connect to https://login.microsoftonline.com. I added the https://login.microsoftonline.com address to my Trusted Sites in Internet Options. Once I had done this, Visual Studio was able to connect to Microsoft and validate my account.
When an error occurs, Visual studio will log it's error messages in the following folder. Please check the logs located at
%Temp%\servicehub\logs
This can also be caused by network restrictions. Please disable your virus guard or firewall and check.
This issue can also be caused by running VS "As Administrator" and the administrator is a different user. Just some FYI.
None of these answers will resolve that issue unfortunately.
Very old thread but if someone is still having this issue, then try following in my footsteps:
I just deleted the entire .IdentityService folder, and launched visual studio again... It asks you to log in and works normally. (for me)
Make sure you can access https://login.microsoftonline.com
If your network is blocking that (perhaps to block Microsoft webmail), then the above solutions will not pertain to you. Either unrestrict access, or you will need some off-line version.
In case someone is still looking for an answer. What worked for me was checking that the AppData folder and Local folder were not on 'read only mode' in the path "C:\Users{username}\AppData\Local.IdentityService" and it just worked!
Check to make sure that your PC no limit(IP-Firewall) to Internet connection access.
Disable or turn off VPN
It happened to me when using an account that uses my organization's email-domain, and I guess it tried to verify it and it couldn't find it in their database, and as soon as I used an account with a onmicrosoft.com domain, it worked.
The interesting part is that it allowed me to create the Microsoft account with this organization email and I still use it for DevOps, and it just stopped me when signing in with Visual Studio, I don't understand why this difference is.
I hope this can help someone..
I have VS 2017 and had this exact issue. Simply deleting
C:\Users\{username}\AppData\Local.IdentityService did not work for me.
Follow the steps 1-2 below to see if you might have and identical cause of the problem, and the rest how to solved it if so.
Go to C:\Users\{user}\AppData\Local\Temp\servicehub\logs and open the latest error logs from VS.
IF you see "Retrieved tenant memberships, found '2' owned tenants", then follow the rest of the steps.
Go to azure portal then login under the username you are
trying to use.
The following steps may change by the time you read this, but you
want to get to step 6. Go to Manage Azure Directory.
Click "Switch Tenants"
I was linked to 2 tenants, one of which I did not need. This is what had been causing my issues. Select the useless tenants, and click "leave tenant".
Once this is completed, close all instances of VS.
Delete C:\Users\{username}\AppData\Local.IdentityService.
Open VS and login to your account.
I found the same behavior when using Administrator user.
Any other user can login and activate the license only for himself.
I don't think there is a way to activate for Administrator, which makes using this licensing awkward for usage in a shared resource (i.e. build server).
The one solution which worked for me was resetting the domain password and restarting the system.
I just wanted to share this because i was struggling with the same problem since 8 days tried everything on net and this worked.
Hope it helps someone :)
I updated Visual Studio with latest package and after rebooting my PC issue was solved. I was able to log-in
Opening VS as admin worked for me, none of the above did
I was getting this error from our proxy having restrictive rules in place, I was able to add the sites to a whitelist that were being blocked while trying to login.
Some of the sites I whitelisted in Webmarshal were:
*.windows.net
*.msocsp.com
*.ws.symantec.com
*.digicert.com
*.clicktale.net
app.vssps.visualstudio.com
demdex.net
For me it was due wrong system time, after setting correct time it got fixed automatically
I had the problem of not being able to sign in to VS after not using unity for a long time and then updating everything. The way I solved it was to open VS and then click help. This opened the sign in box with 'Personalization Account'. I clicked 'Account options' under the afore mentioned heading, and changed the 'Embedded web browser' to 'System web browser' in the right window. This enabled me to log in via my Edge browser and everything worked fine.
I just fixed it by changing folder to be public.
folder files: "C:\Users{username}\AppData\Local.IdentityService"
right click and choose property and uncheck the hidden and apply it.
If you are under a domain network there is a workaround (quick fix),
Adding or changing the following key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb
ProtectionPolicy = 1 (DWORD)
Check the most recent modified files at %temp%\servicehub\logs.
Check StorageUtilitiesSingleton-10788-lqnuymos-1.log
For an error like this: The computer must be trusted for delegation and the current user account must be configured to allow delegation.
If that is the case this might help you.
I has this issue recently.
Tried all the options above, none worked.
Get it sorted, after repairing Visual Studio, doing all the updates, restart and updated again, restart, another repair and bang! Worked like a charm.
Instead of doing all this, change embedded broswer to system browser so it will works normally in default browser and gets updated in VS.
In VS 2019 enabling System Web Browser instead of Embedded web browser fixed it for me,
Hope this helps someone
https://learn.microsoft.com/en-us/visualstudio/ide/work-with-multi-factor-authentication?view=vs-2019
I tried multiple things above such as
Renaming c:\users[user]\appdata\local.IdentityService
Logging directly in https://login.microsoftonline.com (noticed certificate issues)
Adding https://login.microsoftonline.com to the Trust Sites list in Internet Options
Opening VS as non-admin as well as admin
Reviewed the logs here: %Temp%\servicehub\logs
I also installed Chrome, setting it to the default browser, because many features were saying IE is no longer supported
Reviewing the logs gave me the clue I needed to solve my particular issue. The log stated there was an issue with SSL trust.
Consequently, I ran our local version of rootsupd.exe and installed any related Microsoft root certificates such as the DigiCert Global Root G2 to the Trusted Root Authorities. After rebooting my machine, I noticed VS began recognizing my account and was actually already signed in.

Can't access microsoft.com and skype.com web site after installing VS2013 Preview

Recently i installed Microsoft Visual Studio 2013 Preview Ultimate on Windows 7. Everything went smoothly except now i can't access www.microsoft.com and www.skype.com anymore. Tried latest IE10 and FireFox, both show blank page when accessing the above mentioned web sites. Firefox in its left bottom corner shows that it is waiting for ajax.aspnetcdn.com.
I'd really like not to reinstall OS on my machine, so i'd appreciate any idea how to fix this. For myself i tried to stop Firewall service and disable MS Security Essentials runtime protection, neither helped.
PS: I can access www.microsoft.com and www.skype.com from another machine in the same local network
UPDATE: i am using tfs.visulstudio.com as my TFS server and it opens fine if i am not signed in. But once i am trying to log in it opens blank, like browser is waiting for something (the same as for microsoft.com and skype.com). Something related to live ID?
Don't think this is the website to post this kind of question but try uninstalling VS2013 preview because you think that's causing the problem. Search in Google for people getting similar problem. I also don't think it is VS2013 because I can't think of anyway of how VS2013 would somehow disable you from going to a certain website. Make sure the sites weren't down at the time or if you're having something kind of Internet server issues.
skype is owned by microsoft, so you can't enter both microsoft pages. This could be related with some kind of ISP (Internet Service Provider) and not with VS2013, or you can try rebooting your router. Last thing i would do is traceroute both address and see where they fall.
I wanted to write this as a comment but I don't have enough reputation yet. Anyway, obviously trying to uninstall the program and trying again would be a good start as already mentioned, but you should also look inside your hosts file for any weird redirections some virus of malware might have set up. It's located at "C:\Windows\System32\drivers\etc" and you can open this inside notepad (might require notepad to be run as an administrator). Check to see if skype.com or microsoft.com are in there and are pointing to a different IP address. If they are you can just remove them and save the file (might require a restart to take effect). If still no luck you should try a livecd of a linux distro to make sure the problem is definitely inside your windows somewhere.
Let us know how it goes.

Scripts load as default document, but not when referenced directly

Just fired up a fresh Windows Server 2008 instance on Amazon EC2 to begin messing around with the ColdFusion 10 beta and ran into an interesting issue.
This WORKS and properly renders the default index.cfm in the root:
mydomain.com/
This however DOES NOT work:
mydomain.com/index.cfm
Any .cfm file referenced directly within the url doesn't load but if referenced as the default document in a given directory does work.
Like I said, this is a fresh install with nothing outside of the ColdFusion 10 public beta installed along side IIS 7. Ideas?
This is a connector issue from within IIS. The IIS CFM Handler Mappings should have been taken care of during the installation process but apparently that didn't happen in this case. It's possible IIS is missing a feature (like ISAPI support) that the connector needs in order to function.
You can try re-installing (and thus re-running the connection process) or you may be able to use wsconfig directly to re-install just the connector bit:
ColdFusion10\config\wsconfig
... whatever is easiest for you.
Jordan is correct, this is a connector issue with CF10/IIS.
This question is similar to:
Coldfusion 10 on Windows 2k8 - .com/ loads OK but .com/index.cfm gives a 404
I posted an answer to that question that may be useful to others who find this question.
I had the same problem but the "Web Server Configuration Tool" (i.e. wsconfig) did not work for me. My answer to this other question provides info on how to manually install the connector in IIS 7.x.

Visual Studio 2010 Debug Server Not Recognizing My Changes

Using Visual Studio 2010 on Window 7 64bit. I'm trying to test a website project (not a web application project) using the built in dev server (cassini). The problem I'm having is that when I make a change, I now have to actually stop debugging, kill cassini, and restart before I can actually see my changes in the browser. I used to be able to edit and refresh. One of my fellow developers here is able to do this just fine with an identical setup (same project/vs version/os - and settings near as I can tell). I'm beginning to suspect some sort of permissions issue. I've been all over google trying to find an answer to no avail. Any ideas?
As it turns out, this was my fault... I had experienced the dreaded "network BIOS command limit has been reached" issue. I found a post that recommended doing a regedit hack "HKLM\Software\Microsoft\ASP.NET\FCNMode = 1", well this basically turns off File Change Notifications. Changing this value to 2, and applying the changes recommended in knowledge base 810886 fixed both problems.

Resources