I have a server (devserv) with Webmatrix installed. Under settings, I modified the URL so it's now http://devserv:8888.
That allows me to access the 2 sites that I'm working on.
However, that works only I have Webmatrix open. When I close it, the sites are not accessible.
They are not accessible locally either, btw, but I'm giving you the full picture just in case.
The error that I get is that the web.config cannot be read to do insufficient rights.
However, all domain users have the right to read and execute on the folder that contains the sites and I checked the rights go down the tree.
So the question is what am I doing wrong, and why when Webmatrix is open, then there is no problem.
This is a Windows 2008 R2 server Standard and IIS is 7.5.7600.16385
WebMatrix only starts up the IIS Express server for a given site while you are editing it (with WebMatrix open). When you close WebMatrix, we shut down the IIS Express process. IIS Express is really only meant to be used during development time - if you want the site to continue to be available, I'd suggest installing full IIS on it, and using WebMatrix publishing to push your files to the server with Web Deploy.
Hopefully this helps!
Related
How to open a published webform site from within visual studio code. opening and running the default.aspx in browser locally
The site is published by Visual Studio 2019 ( not Visual Studio Code ) to local folder, I want to open and run that published site from another computer having Visual Studio Code only.
Well, to run, show and display a web site, you need to have a web server installed, and then up and running on that computer.
You then need to configure the web server, and what folder or where the web site is published to. However, for reasons of security, often the folders that the web site can see (or use) is VERY restricted. I mean, do you want the whole world messing around in folders on that computer? (not!!!!).
You then need to open up the fire walls, and set rules to allow external use of that given computer.
Now, it turns out, that Visual Studio is able to "debug + launch" your web site during development. This works be having installed a light weight (stripped down) version of a Web server.
So, VS uses what is called IIS Express. It does have VERY high degree of compatibility with IIS
So full version = IIS (Internet Information Services)
Light version = IIS (Internet Information Services Express).
So then, the REAL question is can you setup + use IIS Express (that is ALREADY installed on your computer as a result of installing VS)?
The answer is yes, but it is REALLY but REALLY painfull.
And the reason why? Well, to run + launch IIS express for JUST you the developer, then things like security, rights policies, file access, is http and https etc. setup? Well that is a HUGE FAT BOOK of reading and a HUGE FAT BOOK of massive amounts of configuring required to setup + run a whole web server.
I mean, you do have web.config. But the sheer mass of options available is quite a challenge to setup.
And IIS express does NOT have the main setup and configuring screens included.
So, for hitting f5 to run from Visual Studio? great!!!
But, you need screens like this:
And from above, we have a LOT of stuff:
So, the problem is that IIS Express does NOT include the above management screens.
So, this means that YOU HAVE to edit web config and other config files that are required to run + setup IIS.
Now, to be fair, you could just run with the SAME defaults that VS uses when you hit F5 to run. But the configuring of the web site can be a hassile. (for example, did and do you know WHERE to set the IP address of the web site?
When you run local, then VS uses "localhost". But for anyone else on the network, they now have to use that computers IP address, and then YOU must setup the web server to accept requests to that IP address. And you don't even have to use + give the web server the same IP address as the computer hosting IIS.
So, you CAN use IIS Express, but it going to be panful beyond ANY thing but using IIS Express for debugging your web site on the SAME computer running VS. Remember when running IIS on the SAME developer computer, then you are the "owner" or what we call 'super user' of your OWN computer. But, I can't just start opening files and using YOUR computer right now, can I? (see the difference!!! - allowing OHTERS to use your computer is a really big deal.
But, yes, you can get IIS Express to work. it just that IIS Express is MISSING all the above management screens. (and that above screen shot shows that each one of those icons when chosen is a "big maze" of options.
To get this to work can be done.
I don't have a good reference, and you have to google it, and then with a pot of coffee, read away, since without the configing menus and systems above, you find this to be difficult.
Here is one such article on how to do this:
https://blogs.blackmarble.co.uk/rfennell/2011/03/22/how-to-expose-iis-express-to-external-network-connections-and-use-a-non-self-signed-certificate/#:~:text=%20How%20to%20expose%20IIS%20Express%20to%20external,You%20now%20need%20to%20just%20start...%20More%20
It seems like the View in Browser option doesn't really require IIS and it seems to process ASP pages fine. So how does it really work without a web server?
They used to have a developer web server (Cassini) which is dead long time back so is there some kind of built in capability in visual studio? Who processes the requests by asp pages if it doesn't require IIS?
I already have IIS installed so I am not sure if is servicing the pages but seems like it will work without IIS because I don't configure anything in IIS and new ASP.NET projects work out of the box as well View in Browser option for an asp page option which just directly executes that page.
Actually this is what occurs:
Your web web.config is copied.
Then VS spools up a WHOLE running copy of IIS (it is the express version - but it is the same for the most part as the full edition of II).
Once VS spools up and starts and configures that running copy of IIS?
Then your web page and web application can run. If you look at your system try, you see this:
So in above that 2nd from the left in the tray shows that blue thing icon. I have right clicked on it to show the options you see.
So now you have a running copy of IIS on your computer. So you ARE running a full web server here. (well, ok IIS express - but the base parts and what that means is much the same as the full edition).
Around about VS version 2010, they USED to have a smaller built in web server as part of VS. The problem of course was for Microsoft to maintain 100% compatibility was VERY hard. So while for a considerable time frame and history of VS? Yes, they had a built in web server as part of VS. But they dropped it a number of versions ago in VS, and as noted now use IIS express.
So Now? Well, when you install VS, they also install a working copy of IIS. (the express version). The express version is quite much the same as the full pop edition of IIS. What is removed is "most" if not "all" of the IIS management screens and setup. (and sometimes I wish they would just install that part too!).
Your experience thus that a copy of IIS is launched. Once launched IIS does keep running during your development process (depends on your VS config and setup). But, if you go file->close solution, then you find that IIS express then also shuts down.
So, to view that web page? Yes, VS does config, and then does spool up and start internet services and that web server. So this running of IIS on your computer is what allows those web pages to work and run correctly. As noted, while this is a copy of IIS, it is for the most part the same as the full edition - just with most of the management tools removed. As noted, you SHOULD see that new icon appear in the system tray.
And as noted, I believe around VS 2010, they made that switch from the VS built in IIS to that of now using IIS express edition. As noted, this change was made to ensure a greater probability that when coding and debugging your web site in VS, that the end result will be much the same when running a full edition.
I do find that over time, the production (web hosted site) does get so many config and tweaks and changes, that I now can't include my web.config file in the publish (can't risk overwriting the server production web.config). So, over time, we added things like https security certificates and installed them, and set them up for the production web site. I don't have those same security certificates setup on my local machine. And of course there are some virtual folders and few more things that exist on the production web site as opposed to the dev copy I use. So, it somewhat my fault to let the production web.config over time to become "different" then what I run local when coding and debugging the web site. So now, when I publish - I remove the web.config file before I actually copy the new updated web application to the final production server (which of course is running the full edition of IIS).
But to make a long story short?
Yes, a whole copy of IIS web server is configured for you, and that whole copy of IIS is spooled up, launched, and once that occurs, then your web page option "view in browser" can run. But make no mistake here - IIS services is setup, is started, and is running for that web page preview to occur.
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!
I need to show customer an ASP.NET MVC3 website, but they don't have IIS or Visual Studio installed. only .NET Framework 4 is installed.
So my question is: Is there any tiny little IIS server (like IIS Express), but don't require installation, that can run the compiled site just on local machine?
PS: I don't need advanced features. But HttpHanlders and HttpModules should be working fine.
I back Shan's suggestion to host your website on a server somewhere and access it over the Internet. I don't see why it wouldn't work for Intranet applications either unless you have dependencies on some services like SMB shares or network printers.
The Cassini ASP.NET webserver is portable and doesn't require installation, but it doesn't run the same as IIS and there are things that will break (because it invokes ASP.NET for every request unlike IIS, so if you've blocked unauthenticated visitors then they wouldn't be able to download site images and stylesheets, for example, until they've logged in).
On my Windows XP desktop, I have a fairly simple ASP.NET targetting .net 4 in Visual Studio 2010. I can run it on my local host by ctrl + F5, it works all fine.
I have a Windows Server 2003, that I can access via mstsc, but also via Explorer. When I go to the publish section of my build properties, i see 4 publish methods :
Web Deploy, FTP, File System, FPSE
I have already installed IIS 6 successfully on the Windows Server, and given all authorizations for everything I could so far (to get things to work in the first place, will check on that later).
How should I proceed to publish to that remote machine ? Should I target a specific folder ? Do I need to setup things in IIS 6 for that site first ? Or will it all get settled from te properties I have in Visual Studio ?
Thank you guys,
J.
Personally I've always plumped for a manual deployment; that is I create the Web Site in IIS creating an appropriate AppPool and targeting the correct .NET version to utilise. From there simply copy (xcopy if you will) the appropriate files over, e.g. DLL and all supporting pages such as ASPX, CSS and associated images. In most situations where I have direct / RDP access this is what I run with.
That said, this can be automated from Visual Studio and this can be useful for those situations where you're maintaining an awful lot of sites on a regular basis. With IIS 6 and Visual Studio, this was achieved by installing FrontPage Extensions on the server then utilising the Publish option.
For VS2010 it seems this has been streamlined using the IIS Web Deploy module and configuring the Studio to publish in this manner that looks mildly quick...
HTH
I've never used the Web Deploy feature in 2010, so I can't really tell you about its merits or drawbacks. I've read that it works much better with IIS7 than IIS6. If you have direct access to the IIS root folder on the server (typically c:\inetpub\wwwroot) through a network share I would recommend doing the file system deployment. FPSE works as well if you have to publish to the server through a remote URL, but there are some security issues with FPSE that make enabling it on your web server a less than ideal choice.
Once the files have been deployed, all that should be left is to configure the website as an application inside of IIS.
Remote in to the web server and open IIS
Right-click Default Web Site and choose properties (if you've deployed to a subfolder in the root, then locate that folder and choose those properties instead
Switch to the Home Directory tab (Just 'Directory' for a subfolder)
Look for the Application Settings section and click the button that says Create
Optional: Select an app pool if you have created a custom one from the default
That should enable IIS to execute your .aspx files inside of your application. Once you've successfully configured the app for the first time, you can just keep publishing your app to the same location over and over without having to reconfigure it.