I am trying to setup some web applications to run locally on IIS 7. I have gone through everything on
https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(vs.debug.error.http);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5)&rd=true
Many other posts mention also doing
aspnet__regiis.exe -i
Which I have done several times.
In the IIS manager I can see my site, I can start the app pool find (as well as recycle and stop), but whenever I go to localhost I get a 503. If I try to run the debugger the app pool just dies. One site mentioned that having Visual Studio installed first can cause problems so I uninstalled that and re-installed but that was ineffective (it's also installed/uninstalled through a company web store so I don't know how "clean" it gets after the install).
I've tried manually creating the site, etc in IIS Manager still with no results
Under the Add or Remove Windows Features in Programs I have enabled everything under IIS as well so everything should be installed
Related
I'm really new at this, never hosted an app before, everything I've done so far has been locally.
I have a windows server 2008 sp1 running at work, with IIS installed. I access to it via remote desktop, and I need to be able to deploy my app, first locally on the server, so computers that can access it (through LAN) are able to use it.
Right now, if I create a folder and put some data in it, with an html file, and go to "localhost" in a browser, I can see the rendered html file.
The version installed is IIS 7.0, and my app is uses the MVC pattern, and .net framework 4.6.
If on my windows 10 PC I start my app (vs 2017) I can see it on my browser.
I want to be able to do what I do in my PC but on the server. How can I do this?
Update:
I tried Publishing the app through vs but that is on my windows pc and getting a lot of errors. What I know so far is that a guy from Networks gets the app by the developers and they publish it, but I don't know what kind of files does he need.
I followed tutorials but I just can't apply them.
As I said earlier, I have visual studio installed on my w10 PC, and tried publishing through that app to the ip where the server is, getting a lot of errors.
I don't know what to do, I'm really trying a lot of different things, but I don't even know how the app is supposed to look to be run in any way that is not how I run it in visual studio.
UPDATE:
I'm getting this error when I try to publish locally
Here is the Outline of what we need as per OPs requirement
In VS publish the App to a folder
Sort out the server prerequisites:
Turning Windows Feature On or Off for ASP.NET, ISAPI filters, ISAPI extensions, NET extensibility
Server should have .NetFramework installed
Copy the published folder to the Server
Configure IIS manager to add a new site and set physical path to published folder
So it is super easy to setup debugging for your 4.6 (and <) ASP.NET web app in your local IIS. However, I do not see any way to do this in ASP.NET 5. I see IIS Express, ef, and web. Am I missing something? How can I set it up so that I can push Play and have it pull up a Chrome tab and have full debugging of my web app in my local IIS?
If you meant Controller debugging, you just have to make sure you properly have your breakpoints at the lines of codes you've created. After that, all you have to do is to run via IIS Express and you're good to go, VS will automatically prompt you to take a look at the IDE when you have to perform a stepover or etc.
From there you'll be able to check on your code with the various debugging windows in the 'Debug' option on the top bar of VS.
By the way, if you made a thorough lookup on the state of local IIS with .NET Core, there is no way as of now to do so..
How to configure ASP.NET Core 1.0 to use Local IIS instead of IIS Express?
And to further emphasize the pointlessness of using local IIS, here's quote from this article:
However, with ASP.NET Core there's little to no reason to be running
full IIS during development. Why? Because ASP.NET Core applications
aren't actually running inside of IIS. Whether you running called from
IIS, IIS Express or whether you do dotnet run directly from the
command line - you are running the exact same code and in most cases
the exact same execution environment. Running inside of IIS really
doesn't buy you anything anymore that you can't easily simulate with a
command line environment.
Maybe not exactly what you need, but you can debug it.
Before you start debugging, you need to republish the project to the path specified in IIS.
Browse to any webpage of the app so the process starts.
Then inside your VS go to Debug -> Attach to process. Find and select dotnet.exe. There might be several of them, so ticking Show processes from all users could reveal a few more records.
For example, the pool I use on IIS for .net core apps runs under NetworkService identity so it is easy for me to identify the dotnet.exe process I need to attach to (Attach to Process popup has User Name column that contains identity info).
Finally, VS will start debugging. It's similar to the steps for .net framework + attaching to w3wp.exe
I know there's a way to, in Visual Studio, test a change by getting the page running in the browser, and then by just refreshing the browser page rather than by rerunning the application. But although it was working before, it isn't working now, and I'm fairly new to MVC, so I don't remember what I was doing to make it work. Instead, I'm having to actually re-run the application each time.
Specifically, I 1) run from VS, 2) copy the URL from the webpage I just launched, 3) stop debugging from VS (and the browser closes), 4) paste that URL into a new browser window and hit enter, 5) get "This webpage is not available" from Chrome and "This page can't be displayed" from IE.
I'm using VS Express 2013, and was also using that when it was working. I've tried with both IE and Chrome, and I've rebooted my computer and cleared my cache. What did I do wrong / how do I fix it? Thanks!!
Install IIS locally on the machine you run visual studio on. Create a new site in IIS and point it's path to the path of your MVC project. Change the application pool for it to use .net 4 and set the identity on the application pool to your user account.
Then give it a binding of something like localdev and a host header in your hosts file, then just build the site and go to http colon localdev in the browser.
It will reset the app pool automatically when the build changes.
The way I build sites is I virtualize. I use Oracle VirtualBox and install windows server 2008 r2 (or windows 7 x64) to a virtual machine in virtual box. Then I install Sql Server 2014 and Visual Studio 2013. Then I install Toirtoise SVN and Visual SVN extensions and get the source code from our sub version server and set up websites in IIS similar to how we set them up in production. Then when I want to debug code I just attach the debugger to ws3p.exe.
I searched SO for an answer before, but couldn't find one until after I'd posted mine (doh!). This question has the answer I wanted. Default MVC5 Application will not run out of debug mode in browser VS Express 2013
The issue was that I couldn't edit code (I could edit cshtml) when the debugger was still running. You can disconnect the running debugger and still keep the IIS session active if you uncheck Project Properties / Web / Enable Edit and Continue.
I am building a .NET 4.0 Web Forms application in C#. After working for around 4-5 months on this application, the other day when I went to 'Start' the application from Visual Studio 2010 and the application does not want to start. When trying to connect using telnet on the local host and that port, it connects, and after a while I get an error '400 - Bad Request'.
The funny thing is that when I Publish the application on another IIS server, it works fine, it seems like the problem is from the asp.NET Development Server. While I know that I can set-up a local IIS, I would prefer not to avoid doing this in order to avoid certain problems which might be related to having a different configuration of the local IIS from production.
I have checked the hosts file, re-installed visual studio and confirmed that the application works when published. I have also checked that the port is not being used by another process.
What else should I check?
If the application will not start, then the odds of you being able to connect to it via telnet on a port are 0. (It's not running.)
I am assuming the application can compile if you can publish it. Have you tried running the application without debugging? CTRL + F5
I'm currently developing with the Azure SDK on Windows 8.
I have installed the Azure SDK for VS2010 and VS2012 and have both of them on the machine. Unfortunately, whenever I click to debug my Azure web and worker roles on my local machine the storage and compute emulators boot up and then promptly cause my machine to reboot itself.
This happens in both versions of Visual Studio and I have absolutely no idea why this is happening. Any help would be much appreciated.
I do receive the following output though - I haven't changed anything since it last worked:
Windows Azure Tools: Warning: Certificate identification setting 'Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption' for role 'VizageAPIWorker' specified in the service configuration file is not declared in the service definition file in the Certificate or as part of an SSL endpont
UPDATE:
A blank project compiles and runs with no errors whatsoever
UPDATE
Same project on a Windows 7 PC also causes this problem
Really sorry about that, I've fixed this with the latest version of the nuget package:
New Relic x64 for Windows Azure 1.0.0.27 - http://nuget.org/packages/NewRelicWindowsAzure
I am working on a way to avoid having to reboot at all (rebooting could add roughly 4 minutes to new deploys). The main issue is that the default configuration for an Azure cloud server marks the service "W3CSVC" as manual so issuing an iisreset alone will stop IIS completely - I'd like to replace the call with NET START as detailed here: https://github.com/newrelic/nuget-azure-cloud-services/issues/7
I have seen this problem even when you don't have any SSL endpoint configured in your application, is that your problem? Also if your problem is related with above error, creating a very simple "helloworld" web or worker role, should not cause this problem.
Now if you don't have any SSL endpoint in your application and still see the error:
Then this problem is just machine specific and could caused by specific setting in your machine.
Sometimes rebooting machine, re-installing/modifying application etc just let this problem go away...
Try running Process Monitor to log, file & registry access to see what was being accessed when the crash occurred.
After above test, if your application SSL endpoint specific configuration cause your application and machine to recycle, then it sure could be an issue related to how networking and security components are configured in your machine or exhibit any problem. This could be very specific to your machine and removing factors one by one could help you resolve your problem. This problem is more specific to Windows Azure components in your machine and your machine configuration. You might hit jackpot by finding it soon or may spend countless hours to troubleshoot.
Problem Solved.
It's a strange one and I'm still not sure if I am at fault. But here's a brief explanation, my instance has the New Relic Windows Azure NUGET package installed on it for monitoring purposes. Unfortunately it seems when you deploy this to the azure emulator it triggers a restart of your machine. I noticed this after delving down into the System Event logs and finding the following:
"The process C:\Windows\system32\shutdown.exe (????-PC) has initiated the restart of computer ?????-PC on behalf of user ????-PC\????? for the following reason: No title for this reason could be found
Reason Code: 0x800000ff
Shutdown Type: restart
Comment: Reboot after installing the New Relic .NET Agent"
Removing the New Relic Agent NUGET package stop the reboot from occurring. I am still waiting to hear back from someone at New Relic to see if it's just me being stupid or a genuine bug.