I'm developing ASP.NET applications using Visual Studio 2012. I've always used IIS express to test application while developing, but now I need to test it on production environment.
IIS is running on a remote server, I installed there the Remote Debugger studio, created an application under default site (\test\baseTest), created a test project in Visual Studio 2012 and set to "Use Custom Web Server" at path http://myServerName/test/baseTest/.
Ok, there we are, I press F5 to start debugging, the connection through debugger works correctly (I can see a new line saying "myDomain\myuserName connected" but... the application is void, I miss all .aspx files.
Am i missing something? Should I set some parameters in Visual Studio to deploy all file when debugging to remote site?
This is remote debugging not automatic deployment.
You should copy all the website files to the remote iis.
Remember to build in debug and deploy all the .pdb files.
Check also in web.config.
<system.web>
<compilation debug="true" />
</system.web>
Launch the Remote Debugging Monitor (msvsmon.exe) when you start debugging
There you can find a comprehensive guide to remote debugging:
http://www.codeproject.com/Articles/38132/Remote-IIS-Debugging-Debug-your-ASP-NET-Applicatio
To debug asp.net application from IIS you need to attach w3wp.exe process by going to Tools->Attach to Process option. You can see the detailed steps of debugging using IIS with diagram on this link: Debug asp.net application using IIS
Related
I am trying to publish my ASP.NET 5 MVC6 application to godaddy server from Visual Studio 2015. I have imported publish profile from my server and I am able to validate the connection. However, when I publish my app I have the following error:
ERROR_USER_UNAUTHORIZED
Web deployment task failed. (Connected to the remote computer
("XXXXXXX") using the Web Management Service, but could not authorize.
Make sure that you are using the correct user name and password, that
the site you are connecting to exists, and that the credentials
represent a user who has permissions to access the site.
The credentials are valid, I can publish VS2013 sample project from VS2015, but I can not publish VS2015 sample project as well as my app from VS2015 with the same credentials.
The user is an admin on the server.
The first thing you need to check is if GoDaddy supports 4.5.1 on their server. Once this is confirmed? We can start working!
Helios (the shim between IIS and ASP.NET 5) requires at least 4.5.1 to run so this is why it's essential.
Only thing missing is running a dnu publish and making sure that you have a web.config with this section in it:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
If it doesn't work, I would get in touch with GoDaddy for some support. If they do not support the latest version of the framework, you might have to revert to MVC 5 or switch to azure-web-sites if you really want to enable asp.net-mvc-6.
I have an ASP.Net web application developed in Visual Studio 2008 (.Net 3.5). I have copied this solution to another root folder (both on my Win7 64b machine) and upgraded the copy to VS2013 (Professional) and .Net451, but when I try to debug the web app in VS2013 I get an Access Denied error ("Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server"). I don't have this issue runing the original from VS2008 on the same machine.
Apart from the changes mentioned above the two are a straight code copy.
In VS2008 the project Web properties are: Use Visual Studio Development Server, auto-assign port, Virtual path = /
In VS2013 the project Web properties are: Server=IIS Express, Project URL=http://localhost:63064/ (and I have clicked on Create Virtual Directory)
I can see this must be some sort of security issue, but what extra needs to be done to get a VS2008 web app, upgraded to VS2013, to run within the VS2013 IDE?
Postscript: If I start the web app without debugging (ctrl-F5) I get "HTTP Error 503. The service is unavailable."
It turns out that the simple solution is configure the web app properties in VS2013 to use the local webserver (IIS) instead of IISExpress, and also to run VS2013 as administrator (but this is not necessary for VS2008). So obviously it is an IIS permissions thing but IIS is common and hasn't been changed - so what has changed in VS2013 to make this necessary? I don't really want to run VS2013 as administrator if I can avoid that.
I am running Visual Studio 2008, IIS 7.5 on Windows 7 x32. I am able to run the ASP.NET web site in IIS 7.5 without debugging just fine, but when I press F5 to debug it, I get:
Unable to start debugging on the web server. Unable to connect to the webserver. Verify that the web server is running and that incoming http requests are not blocked by a firewall..
In VS, right click on your web project --> Properties
Go to the Web tab.
Make sure the appropriate radio button is selected (Use VS Dev Server, Use Local IIS Web Server, etc)
After a computer freeze I've had that value change on me.
Another thing to try:
run "iisreset" from an administrative command prompt (basically just restarts the IIS service)
Check if your IIS is running, if isn't try to initialize him and run again on VS.
Try the following:
Open IIS > Add a new Application (not a virtual folder) to the Default Website.
Make sure the application runs under the right .net framework version (i.e. DefaultAppPool ussually runs under .Net 4.0)
Map the application in IIS to the right project folder (where your bin and obj folder appear after a build)
In IIS, right-click the application, and click 'Manage application' > 'Browse'. This will launch an internet exploreren to the right path. This could be localhost:80/Shop instead of the expected localhost/Shop (caused by for example a reservation for other applications of the direct localhost/ location)
In Visual Studio > go to the application properties > Web > check Use local IIS > and set the correct location of your application in IIS (you should know this from step 4)
Verify that your web.config has the following entry:
<compilation debug="true" targetFramework="2.0" />
Note: If you are targeting framework 1.1, then obviously change the 2.0 to 1.1.
UPDATE:
The `targetFramework` attribute is new in .NET 4.0 and later, so to enable debugging on .NET 2.0 and earlier, then you cannot use the `targetFramework` attribute, like this:
<compilation debug="true" />
Just to check: See if Windows Authentication is enabled or not? It should be enabled.
Internet Information Services (IIS) Manager > Expand PC/Server Name > Expand Sites > Select Default Web Site > Select Authentication. It should be enabled.
Make sure that the port defined in the Project Url under the Web tab of the properties of the web project is the same one as defined in the IIS Manager.
I had this issue and fixing the port solved the problem for me.
I had a case, where I could load the site in chrome, but deugger could contact the server. Turns out Chrome auto-maps .localhost addresses, but VS does not.
Adding the localhost address to my hosts file solved the issue.
I am having some trouble deploying my MVC3 application to my localhost. I am looking for details to build and deploy a ASP MVC 3 application to my local system. I've tried to deploy this, but have run into problem after problem. Instead of tracking each problem down separately (and I may have to do this anyways) I would like to create a one stop guide for myself and others that see this post.
I'm looking for steps including libraries to install (ASP MVC3, IIS, etc) on a Win7 SP1 machine with VS2010 installed. Also how do I set up IIS, and how do I publish? The goal will be to deploy this web app to another Win7 machine in the house, but localhost will be the first step. In addition, it would be helpful to know whatever steps are necessary to make the website accessible from another machine on the same network.
Here is what I have done so far:
Created an ASP MVC 3 application with VS2010
Built and Run
Installed IIS
In IIS - "Added Application" on "Default Web Site" with the Alias: "Hello"
4a. "Hello" runs on the DefaultAppPool, .Net 4.0; Integrated Pipeline
4b. "Hello" has the physical path C:\inetpub\Hello
In VS2010 - right clicked the project and selected "Publish", using FTP
web browser: navigate to "localhost/Hello"
500.19 - Internal Server error:
Config Error: This configuration section cannot be used at this path. This happens when
the section is locked at a parent level. Locking is either by default
(overrideModeDefault="Deny"), or set explicitly by a location tag with
overrideMode="Deny" or the legacy allowOverride="false"
Config File:
\\?\C:\inetpub\wwwroot\web.config
Requested URL:
http://localhost:80/Hello
Physical Path:
C:\inetpub\Hello
Config Source:
68: <validation validateIntegratedModeConfiguration="false" />
69: <modules runAllManagedModulesForAllRequests="true" />
70: </system.webServer>
Download and install ASP MVC 3
Create an MVC3 Hello World App in Visual Studio
Install IIS from the “Windows Features” / “Turn Windows features on or off” in Windows.
Next, you need to configure a website in IIS. I created one on port 81. Open IIS Manager, and “Add a Website” to the “Sites” node.
For this website, I created this on D:\WebSite, and configured it to run on DefaultAppPool, configured for .NET 4.0, on port 81.
Most of the time, IIS is installed after installing the .NET Framework, so you’ll need to run some commands to register ASP.NET on IIS.
start cmd.exe as an administrator and run aspnet_regiis -i in C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Initially, I had some trouble publishing the project to the destination but for whatever reason, Publish method: “FTP” to Target Location “D:\WebSite” seems to work quite well and publish only the minimum required files.
traditionally you could only deploy to your server using ftp. Though it doesn't make a lot of sense to ftp to a server which runs locally. However Microsoft recently introduce the Web Deployment Tool which works really well. Once you install them then you have the option of creating a deployable package
In Publish dialog, choose option Filesystem instead of FTP, and give it path you have set in IIS
I have local my projects asp.net open in visual studio 2010. And also copy this project to IIS folder in remote hosting. Cause in hosting directory I don't have VS so I copy there remote debugger application. I connect from my Visual Studio to IIS process on hosting, but any of breakpoints not fire.
Why ?
I had the same issue when I connected using the Transport in the "Attach to Process" dialog set to "Remote (native only with no authentication)". I was able to connect to the IIS process (w3wp.exe for IIS6 on Win2K3), but no breakpoints were hit when I navigated within the web app.
To get it working, I changed the Transport to "Default". Then I ran into numerous issues with successfully connecting to the Visual Studio Remote Debugging Monitor. But once I resolved them all and was able to get the list of processes from the remote machine, I could connect to W3WP.exe and voila, my breakpoints started working and I was able to debug normally.
You don't provide much detail on your local and remote configuration, so this just a guess whether it might help.