"Unable to connect to the ASP.NET Development Server" message in Visual Studio 2010 - visual-studio-2010

I just checked out an ASP.NET MVC 3 web project using TortoiseSVN. I opened it in vs2010 and successfully built it. But when I try to run the project, vs2010 gives me an error with the following message "Unable to connect to the ASP.NET Development Server". When I open the development server dialog via icon in notification area and try to browse through the link in this dialog a web page opens with "HTTP Error 403 - Forbidden".
This looks quite odd, as when I create a new MVC project in the same solution and try to run it, it runs normally. This problem occurs only with the aforementioned project.
Please share any ideas.

This worked for me:
Open web.config
Remove everything in the <system.web> section
Run the project (it should work now)
Undo your web.config changes and you should be good to go.

Try to change assigned port in project properties-> Web-> set specific port instead of auto assign.

Related

Azure Web Site not updating via Visual Studio Web Deploy

This may be a basic question, but I've searched for a little while and couldn't find anything specific to this.
I bought a domain and created the web app in Azure for hosting, and set up the DNS so that it's linked to the Azure Web App. Using Visual Studio 15, I opened the website via the FTP connection settings found in Azure, and was able to create files, edit the html, css, etc. Going forward, I wanted to use Web Deploy with Visual Studio to push new builds of the code up to the web site. I downloaded the publish profile from Azure, and imported it into a new visual studio project. I also copied all the previous files over(it wasn't alot). I got the correct Web Deploy settings and successfully published the solution to the Web App in Azure. However, it never updates the code with my new changes. When I look at the site in Firebug it still has the same files/code that it had when I edited it via FTP.
Any idea what I'm doing wrong?
I followed your steps and everything published perfectly for me. Did you try to simply refresh the file list to make sure Visual Studio is seeing all your files? Are they included in your project?
Also, when you go to publish, on the 4th step labeled preview, try to hit "start preview" and see if it detects any changes.
Also, could you tell me a bit more about your project? Is it a website project folder, mvc solution, etc?
You could try to clean the website to make sure your new files are getting deployed.
Clean Windows Azure Website

Visual Studio keeps requesting missing web components

When I open a particular mvc 3 website project in VS 2010 I get the following message:
The Web Project "X" requires missing web components to run with Visual Studio. Would you like to download and install them using the Web Platform Installer now?
ASP.NET Web pages with Razor syntax.
When I click yes
The web platform installer shows with the message that "0" items need to be installed.
My other mvc 3 projects do not show this behavior
Not a major inconvenience, but still...
thoughts any one?
I got the same error after reinstalling my computer.
I came to this conclusion, VS needs IISExpress to load my additional project. The addition projects has a webservice and it can run locally. Even if my endpoints points to a local address it still needs the IISExpress (standard IIS 7.5 does not respond the endpoint request) to open from VS (im running VS2010).
So after installing IISExpress i could reload my project in VS.
C.,
That shouldn't happen, and it would be interesting to figure out why. In the meantime, you should be able to turn this off by unchecking the "Package Restore" checkbox in Visual Studio's Options dialog. (Select "Package Manager" in the tree view to find it.)
If it's happening only for specific projects, you can solve this more surgically by removing the packages.config file for the affected project. In fact, if you want to do root cause analysis, you should look into why that file exists and how it got there.
HTH,
Clay

Visual Studio 2010 change from localhost to full computer name/domain

I am using Visual Studio 2010 and I would like change debugging environment from the localhost to my full computer name/domain. Does anyone have some step by step instructions on how to do this? (I would also like to set it up as the default for all new projects plus how to change it in existing projects). I am new to using visual studio and programming in general.
I found this post Visual Studio 2010 - Change localhost to custom domain in the forum but it wasn't clear to me on how to make the change. I went to the project properties web tab and attempted to set up local IIS Web server but got the following error:
"ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly."
I am not ever sure if that was the correct way of going about doing this. I just need my debug url address to go from:
"http://localhost:53674/Projectname.aspx"
to:
"http://computername.pag-domain.webname.org/Projectname.aspx"
Thanks!
For fixing the iis web server, I am not really sure what was done...our IT department worked on that. For setting up the local IIS webserver in visual studio I did the following: In the web project properties, under the web tab, I choose "Use Local IIS Web server, in the project URL, I put the full computer domain and told it to create a virtual directory.
Got it. Our IT came to the rescue — he fixed some issues with the ASP.NET not accessing 4.0 correctly. Then I set up the "Use Local IIS Web server" correctly and it worked like a charm.

Can't add web service project to solution in Visual Studios 2010

I have a web service that Visual Studio just won't let me add to my solution.
If I right click on the solution, click Add, then Existing Project, then I navigate to my project, select the Visual C# Project file, I get "The local IIS URL http://127.0.0.1:8099/ specified for web project has not been configured.
It asks if I would like to create the virtual directory now.
If I choose no, nothing happens
If I choose yes, creation failed error, could not find the server http://127.0.0.1:8099 on the local machine.
Creating a virtual directory is only supported on the local IIS server.
Does anybody know how to fix this? I've been struggling with it for a while. Thanks

VS2010 Error in Recycling IIS Application Pool: Not Found

I'm making a Sharepoint visual web part in Visual Studio 2010 and it seems like out of nowhere I started receiving the error: "Error occurred in deployment step 'Recycle IIS Application Pool': Not found"
In the output for my program it says which application pool it's looking for and I know it exists because it shows up in IIS Manager
Now I've already tried resetting IIS, along with recycling the application pool manually in IIS Manager.
Really I'm sort of at the end of my rope and any help would be greatly appreciated.
This usually happens when the user that has run Visual Studio doesn't have rights to Recycle the IIS application pool.
To solve this, run visual studio with some user who has rights (shift + right button -> run as different user) or try to follow this:
http://msdn.microsoft.com/en-us/library/aa954062%28v=bts.70%29.aspx
The simple solution for the above issue is
Step1:Close the Visual Studio
Step2:ResetIIS
Step3:Open Run and Enter Services.msc, Restart the "Windows Management Instrumentation" service
Step4: Recycle the Application pool in inetmgr.
Step5:Reopen the VisualStudio now deploy.
Hope it will help others.
Thanks & Regards
Kishore Appini
When I experienced the same error, checking the following helped me:
Make sure the Web Application exists on SharePoint.
Make sure the site collection you are trying to deploy to, exists.
This is the siteURL specified in your project's properties. To see
this property, you have to press the F4 key after selecting the
project in solution explorer (in Visual Studio).
In my case, I had not created the site collection and also the siteURL had a previous server mentioned in it.
You need to set the 'Site URL' correctly in the project properties.
click on your project name in the solution explorer and press F4 for properties.
Then check the Site URL.
The Site URL must be the same as Project Server URL.
example http:// spsw001/pwa
This solved the problem when I got this error message.
This must be the solution for the scenarios:
http://praveenbattula.blogspot.in/2013/07/error-occurred-in-deployment-step.html
If you have a public URL for your collection which is a DNS entry that is pointing to your SharePoint server then what you need is an "Alternate Access Mapping".
Go to Central Admin > Application Management > Configure Alternate Access Mappings and create an internal URL for your public URL.
Set your project server url property to point to the newly created alternate access mapping and it should work.
Note: This is valid for SP 2013
In my case it was due to missing database permissions. As mine was a DEV box, I just added my Windows account (=the account I was logged into the DEV server) to SQL Server as sysadmin.

Resources