Solved

How to Add an ASP.NET 4.0 website to IIS7 in SBS 2008

Posted on 2014-01-14
16
898 Views
Last Modified: 2014-01-14
Hi,
I am new to ASP.NET having been used to ASP. I have created a web application that runs fine in Visual Studio 2013.  I want to run it on a Small Business Server as a website.

I created a new Site in IIS7 and as part of that process pointed the site to the folder on the server that holds the web application files.  I initially copied those to that folder using VS2013.

Once the Site was Created I can now see the site listed in IIS under its name "AIPWeb" and if I open the application pools collection I have an application pool called AIPWeb and it contains 1 application  "Root Application" that has the physical path that points to the folder on the server holding my files and site "AIPWeb" and it is application pool AIPWeb (V4.0).

I have set my default page to "default.aspx" which is the starting page in my site. I also set the bindings to type "http" Host Name "AIP" Port "80" IP Address "*" and I thought I was good to try out my site.

If I then Select the site "AIPWeb" and in the Actions pane click "Browse AIP" on *:80 (http) IE opens up with the address http://aip/ and I just get the message "Internet Explorer cannot display the webpage" ??

Can anyone point me to what I have missed as it's driving me barmy!

Siv
0
Comment
Question by:Siv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 6
16 Comments
 

Author Comment

by:Siv
ID: 39780355
I just tried accessing the site via the internet using the browser on my own machine which is external to the network where the application is running and I get a 404 error:


The resource cannot be found.
  Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

 Requested URL: /AIPWeb/Default.aspx

It feels like I am not quoting the correct address and IIS cannot find the page I am looking for?

Siv
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39780363
Could it be a web.config error?

Open this file and right under

<system.web>

enter the next line:

<customErrors mode="Off"/>

What does a reload of the site tell you?
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39780368
How does your machine know where the website 'AIPWeb' lives?  (instead of e.g. www.AIPWEB.com which domain you must own off course)

Did you add an hosts entry?
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 

Author Comment

by:Siv
ID: 39780390
Patrick,
I get this:

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Siv
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39780396
Hi Siv,

I know... so you open a browser and type in   http://AIPWeb/default.aspx

HOW is your machine to know where that site lives on the internet?
0
 

Author Comment

by:Siv
ID: 39780417
I actually use:

http://remote.advantage1.co.uk/AIPWeb/

or

http://remote.advantage1.co.uk/AIPWeb/Default.aspx

Either way I still get the same error?

It's almost as though something is not enabling the website but when I check everything it says it's running??

Siv
0
 
LVL 23

Accepted Solution

by:
Patrick Bogers earned 500 total points
ID: 39780429
Ok clear,

This way you have to make sure the AIPWeb is not a standalone website but a application within the website where http://remote.advantage1.co.uk/ lives. (guessing it is the default website)

So rightclick this website in IIS and select add application.

Name it AIPWEB and point it to the right application pool and physical location on the harddisk.

Then, try again.
0
 

Author Comment

by:Siv
ID: 39780455
The only issue I have with that is that all the stuff on the default website is ASP.NET 2.0 and my application is 4.0.

I might be able to make it 2.0 as I am not sure I have used anything 4.0 specific, but I'd rather not if possible.  The other alternative would be to make all the stuff in the default website 4.0 but I don't know if that would break Small Business Server??

Siv
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39780476
Hi

I understand this concern. But there are options.

Obviously you own advantage1.co.uk
Now what if you create a new A record in its DNS at your provider and name it AIPWEB which points to your webserver public ip (starting with 213.123)

That way you could rename the standalone website AIPWeb to aipweb.advantage1.co.uk
Also in IIS in basic settings add host name aipweb.advantage1.co.uk to port 80.

Once DNS is replicated you can use this address.
0
 

Author Comment

by:Siv
ID: 39780510
Patrick,
I can see what you're getting at, but why can't I just tag AIPWeb as sub-directory for example if I look at OWA (Outlook Web Access) it has the URL  (as viewed from the server itself) as:

https://sites/owa

How is that concocted to point to the "SBS Web Applications" site and it works?  What bit of plumbing in IIS or DNS is pointing the Site "SBS Web Applications" effectively to http://site or https://site and then each application within that gets a subfolder?

Surely if MS have done that I ought to be able to do that with mine so that I can have:

http://AIPWeb/AIP or something or if coming in from remote

http://remote.advantage1.co.uk/AIPWeb/

I am confused?

Siv
0
 

Author Comment

by:Siv
ID: 39780617
Patrick,

I just tried compiling the asp.net to version 2.0 and a shitstorm of errors started to appear, so it does look like I am going to have to try the DNS method and create an A Record that points to a different name than remote.advantage1.co.uk and allows me to bind my own site to it rather than piggybacking on one of the existing sites!

If you can think of anything else that would be great.

Although I provide development and IT Support for the company it's the company who does their website that has control of the DNS records so I'll have to contact them and get them to add the A record.

Siv
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39780626
Hi Siv,

A little correction, OWA is a subsite for the default website which by default is running under .NET2 as all subsites underneath it.

You can tag AIPWeb as a subdirectory but not under the main page that is configured to use .NET2 (even i have seen many instances of default website thus RWW/OWA run under .NET4, it is a matter of trying) If it keeps working your home free, if something failes you must look for alternatives like i described.

Whats against putting the default application pool to .NET 4 and test?
0
 

Author Comment

by:Siv
ID: 39780644
Patrick,

I am frightened, as SBS has so much of its internals hard wired that although in theory you should be able to upgrade the sites to DNF 4, I just have this horrible feeling that it will break something else on the server and cause loads of trouble for users. If I thought I could back it out to 2.0 again quickly I'd probably do it!

If you are confident that changing the default apps to 4.0 can be easily undone I might give it a go?

Siv
0
 

Author Comment

by:Siv
ID: 39780742
I just tried changing it to 4.0 and now I am getting internal server error 500 with OWA and Remote desktop, so I have changed it back to DNF 2.0 and rebooted server let's hope it all works on starting back up??

Yikes!
0
 

Author Comment

by:Siv
ID: 39781031
Patrick,

Panic off, I discovered it was I had changed the "allow 32 bit applications" in the default app pool settings that was causing that.  I have now got it working by setting the SBS Web apps to DNF 4 and (touching wood) it all seems to still be working (I tested OWA and RWW and they are both OK!)

My app now runs and I am getting al the usual errors from SQL Server etc but at least it's moving forward now.

Thanks again for your help.
0
 

Author Closing Comment

by:Siv
ID: 39781035
In the end adding my site to one of the existing App Pools worked.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question