I made a web service with MVC4 and running on localhost with IIS express seems fine.
But I need to access from outside, so I'll have to use a local IP.
I've found out that IIS Express only accepts incoming requests with localhost specification in the header.
I've tried to go to the "applicationhost.config" and change the
binding protocol="http" bindingInformation="*:4019:localhost"
to this:
binding protocol="http" bindingInformation="*:4019:10.250.38.85"
but now visual studio wont let me run IIS Express saying its unable to launch.
I've also been wandering around IIS manager trying to attach one of the websites to the project without success.
What am I forgetting?
I'll also need this to use SSL and not sure how to configure
I've tried to edit IIS Express applicationhost.config and change binding protocol="http" to https but then vs2012 couldnt even load the project saying it couldnt create the virtual directory
Is there a way to change IIS express to normal IIS 7 so I can use the manager?
You can assign IP in the iis as follows:
Then you need to publish your website into this iis website. it will work....
Related
We´ve created a ASP.Net Core Web App and added some controllers. For some reason when I want to run the application, it connects to my local IIS express and the only message that occurs is the following
ERR_CONNECTION_RESET
I don´t try to connect to the port via SSL, so I don´t think it´s a certificate issue.
It doesn´t matter which controller I try to call. For some reason this behaviour appears just on my machine. If I create a new Wep App it works perfectly fine.
I tried the following steps:
Changed the port number in the web server settings in the project properties
Uninstalled IIS Express and reinstalled it
Deleted the hole .vs folder in my project
Host the web app on my local IIS Server
Compared the hole project settings with the project settings of a machine, where it runs fine
I´m stuck on this problem for 2 days now and don´t want to reinstall VS2017. Maybe it´s just a little thing which I´ve missed.
Thanks for your replies :)
The problem was based on my Visual Studio instance. Reinstalling Visual Studio + repairing after this over the VS-installer solved my problem
If your problem is: ERR_CONNECTION_RESET and you said you tried:
Changed the port number in the web server settings in the project properties
Consider that IIS express reserve ports in the range 44300 to 44399.
I had exatly the same ERR_CONNECTION_RESET when i set IIS Express port out of this range.
The solution was to put port number inside this range. Hope it helps you.
I keep getting errors saying that my IIS express has stopped working and I would like to configure my project to use IIS instead of IIS Express. When I run it I can see that is says IISExpress, as seen in the picture below. I tried to research a possible solution and saw that some people were able to go to properties and change the server to use Local IIS but I don't think I have that option available in the same place because I am using a different type of project. How would I be able to configure my project to use Local IIS (and stop receiving these "IIS Express Server has stopped working" error messages).
Thank you
You need to adjust the project properties to point to IIS.
See: MSDN
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 bought a new Windows 8 PC last week.
First I installed VS 2010 on it but then that wasn't working properly so I uninstalled VS 2010 and then installed VS 2012 professional edition and SQL Server 2012.
Now I am able to create Windows applications but I am not able to run even a simple ASP.Net website.
When I try to view Default.aspx in browser it throws an error message that
Unable to connect to the configured development web server
so then I went into Add or remove components and installed IIS. but I still get that error message.
Even if I try to save the website at a folder location, the ASP.Net development server is not able to run the web page.
I get the same error message using either IIS or ASP.Net development server.
I am wondering is it Windows 8 security related issue?
How can I make sure my ASP.net Development server was installed correctly and has the appropriate permissions to run?
Does ASP.net work with regular Windows 8? or do I need Windows 8 pro? Microsoft's website doesn't say anything about it so am assuming Windows 8 should work because the Windows forms application works.
Please advise. I just want to be able to run a simple ASP.Net application to verify the installation.
I tried http://forums.asp.net/t/1768992.aspx/1 but that didn't work in this case.
ASP.NET IIS Registration Tool (Aspnet_regiis.exe) would be one of my suggestions along with checking what identity is the Application Pool in IIS using as it may have limited permissions. Last but not least, run Visual Studio as an Administrator so you don't have UAC issues.
All right. I had this problem for a week and I have tried many solutions. Finally, the following procedure will fix the problem.
I have set the Firewall system manually. This means that, at the time of communication by programs Firewall notify me. Incorrectly linked to "devenv.exe" was blocked by the Firewall. Correct mode of communication "devenv.exe" will solve the problem. "devenv.exe" is located in the following path.
"C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ Common7 \
IDE \ devenv.exe"
Devenv lets you set various options for the integrated development environment (IDE), and also build, debug, and deploy projects, from the command line.
Enjoy...
I've run into the same general error message that you stated, but the details of my error included the following:
Unable to connect to the configured development Web server.
Failed to register URL “http://10.10.7.209:53553/“ for site
“FooBarSite” application “/“. Error description: The format of the
specified network name is invalid. (0x800704be)
The fix for me was to make changes to the applicationhost.config file located in C:\Users\Jed\Documents\IISExpress\config
Specifically, I had to update the bindingInformation for the site so that the IP Address matched the IP Address of my development computer.
Instructions
Run ipconfig to determine the IP Address of your computer
Open C:\Users\Jed\Documents\IISExpress\config\applicationhost.config (in Notepad)
Scroll down to <sites>, then find the <site> that has the name of your project (in this example it was FooBarSite
Update the bindingInformation so the IP Address matches the IP Address that was determined in ipconfig
Example
<bindings>
<binding protocol="http" bindingInformation="*:53553:localhost" />
<binding protocol="http" bindingInformation="*:53553:10.10.7.209" />
<!-- I had to change the IP Address from 10.10.7.209 to 10.10.7.214 -->
</bindings>
I've looked all over this site and I cannot find the answer to this question.
Basically I'm trying to set up a new site for use with another project I'm working on. This site will run locally on my personal computer and will also be accessible via internet. So I installed IIS 7.5 Express and IIS Manager 7 to host this site. When I went into VS 2012 elevated to create a new site and map it to 'localhost', it pulled up the following error:
Invalid URI: The hostname could not be parsed.
2nd attempt was by creating the site in a new directory by itself inside inetpub, just for the project itself and leaving wwwroot alone. When I do this, I get the following errors:
Filename:
\?\C:\Users\Joel\Documents\IISExpress\config\applicationHost.config
Error: Cannot read configuration file
File system Web sties are currently configured to use IIS Express. To switch back to using the Visual Studio Development server, change the development server option under the Projects and Solutions\Web Projects category of the Tools\Options menu.
When I browse the above location, applicationHost.config does not exist, but when I go to
C:\Windows\System32\inetsrv\config
I find it just fine. IIS Express 7.5 works fine and IIS Manager can find the default site just fine and will even let me browse it using my web browser. What am I doing wrong and how can I fix this so that VS 2012 can create web sites and access the necessary files.
I run Windows 7 Professional x64 and I just finished installing IIS Express and IIS manager. I configured VS 2012 for Web Development. I ran VS as Administrator (elevated) for all of this.
Okay, I found the solution. I needed to manually set Visual Studio NOT to use IIS. Not sure what the issue is there.
But the solution is here for everyone else having this issue.
It was right there, I'm sure, when I was setting it up initially and I just missed it. After doing that, I could set up the new website to use the file system, which would bypass IIS anyway, but the setting to use IIS was conflicting with the bypass, which caused the error.
Hope this is superhelpful!