Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is easiest no fail way to publish asp.net app?

Sorry a bit of an open ended question but I am having issues deploying an asp.net report project and any solution to get the site up is fine.

I am running Win7/SQL 2008 and want to publish a asp.net report site that I created in VS 2008. Website launches when I run in debug in Visual studio but I want to publish the site so that it can be seen on the LAN.

I published the files off to a folder and started up the IIS manager and added a new site and pointed to that folder. Set the permission on the folder to share to everyone.

However when I go to the DNS name I put in for the website it does not launch. Any ideas on this?

I see websites out there talking about a web sharing tab on the folder properties but I do not see that when I go to folders. Why might that be?

Another avenue I have not pursued yet is publishing directly to a website. Has anyone tried that? Is that better or worse than publishing to filesystem?

share|improve this question
    
What errors do you get back in the web browser? Is it a 500, a 404? Can you ping the DNS name? –  NYSystemsAnalyst Feb 11 '10 at 19:53
    
Good questions. 1. pinging the dns name returns "could not find host xxxx" 2. I don't see the actual error code in firefox or IE (If someone know where I can see that please tell me). I see in Firefox "Server not found ...Firefox can't find the server" –  Maestro1024 Feb 11 '10 at 20:24
    
Well, it sounds like you have a DNS issue, not an ASP.NET publishing issue. Is this web server internal to your LAN? If so, talk to whomever administers your DNS server. –  NYSystemsAnalyst Feb 11 '10 at 21:13
    
It is the same machine. I am hosting it and trying to view it on my same machine. I would think that is not an issue. I did try it earlier on a different machine with the same result. I suspect something is weird in the configuration with iis but have no idea what. –  Maestro1024 Feb 11 '10 at 21:46
add comment

6 Answers

It sounds like you may have configured Host Headers, but did not make an entry in your hosts file or DNS server. So here is what I would advise:

Check Bindings for your app in the IIS Manager, what does it say? If I configure a binding to 'mysite' then in order to access the app with that host name, I still need to make an entry on the local hosts file or a CNAME alias in the DNS server. Since it sounds like you want the simplest option, I would go with a hosts file entry. Review this article for help editing the file: http://www.windowsreference.com/windows-7/edit-hosts-file-in-windows-7-windows-vista/ .

Additionally you will want to review the System event log in the event viewer for warnings and errors in the relevant time frame. Keep an eye out for source of W3SVC or anything referencing ASP.NET. If you find an error research it to get to the source of the problem.

You also want to confirm that the app is started via the IIS Manager.

share|improve this answer
add comment

Smells like TCP Loopback problem. I am saying that because you are trying to publish to the same server.

This technet article describes a 401.1 problem when trying to browse the site. http://support.microsoft.com/kb/896861 While this may not be your problem you should still take a look at a possible security issue due to loopback check.

share|improve this answer
add comment

I have still had no luck with this.

I looked at http://blogs.msdn.com/charlie/archive/2009/04/08/publishing-an-asp-net-web-application-in-iis.aspxlink text

And after looking at this I went through the IIS settings in program files. And turned on all of the features that seemed appropriate. asp.net was not turned on before which makes me wonder how this works in debug in VS2008?

I have not made a setup project in VS2008 and may try that too.

Any other ideas?

share|improve this answer
    
The server used for debugging purposes in Visual Studio is independent of IIS, so the fact that it worked during debugging doesn't mean that IIS is properly setup. –  Waleed Al-Balooshi Jun 7 '10 at 21:21
add comment

If you're using your local machine as your webserver, then this is what you can do to make it work.

First navigate to your inetpub folder and inside that folder make a folder for your reporting website.

Second open your visual studio and publish the application, you will need to browse to the path of where that folder is that you just made.

Third, go to your admistrative tools, open up the IIS manager. Click on the sites icon, click on default web site and you should see the folder that you created in there.

Right click on the folder, and select convert to application. Keep the default settings and click okay.

You should now be able to go to http://localhost/reportingFolder/ in your web browser and the webserver should render the site. Make sure that you have a file called default.aspx in the site somewhere so that the browser will automatically load up the site.

Good luck, and hope this helps some.

share|improve this answer
add comment

Have you tried restoring IIS to its original state, or uninstalling and then installing it again? I recently had a very similar problem and this worked for me.

share|improve this answer
add comment

The thing I eventually found that worked for me.

On the machine I want to publish on. Start up Visual Studio as administrator and select the Publish to local machine

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.