Question

VS2005 Asp website publish in IIS

Asked by: nasps

Hi all,

I'm newbie to asp.net website design but I've made one on my PC through VS2005 and i'ts working fine. This website will be accessed only in my company's LAN so, I tried to publish it in IIS (W2K3). Steps made so far:
- Copied all the project web file to a folder in the company server under ~\inetpub\wwwroot;
- create a new website in the IIS (asp 2.0)
- config a local url to access the web site
- on IE I get the error below... (code)

I send in attach a copy of the web.config file
I don't think that matters but my first page is not a default.aspx but login.aspx but i guess that I won't even get there yet.
What am I missing here???

Any help would be appreciate.
Thanks in advance

Server Error in '/' Application.
--------------------------------------------------------------------------------
 
Runtime Error 
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 
 
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
 
 
<!-- Web.Config Configuration File -->
 
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 
 
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
 
 
<!-- Web.Config Configuration File -->
 
<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-03-25 at 07:23:59ID24263319
Tags

asp.net

,

website

,

vs2005

Topics

Web Application Hosting

,

.Net Application Servers

,

Microsoft IIS Web Server

Participating Experts
1
Points
250
Comments
22

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. StyleSheet - VS2005
    I would like to know how to use StyleSheet.css in asp.net - VB. I am using VS2005. I have never use this template before. I kind of know what it does.
  2. VS2005
    Is VS2005 team edition the industry standard tool for developers now? Is VS2005 pro insufficient and lame? Thanks.
  3. Ajax function to read web.config will not work in VS20…
    Hi all, I've written a function (see below) that simply reads a node value from my web.config file and displays it. This works fine in a standard old HTML file located in a folder on my desktop with the associated .js file and web.config file. However, when I load these ob...
  4. Publishing VS2005 crystal reports application to the web
    Have created a simple application using vs2005 with a single page with a crystalreportviewer control on it. If I right-click this page and select view in browser, all the data appears correctly. Having built the application, I then want to copy it to a folder in an existing w...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: naspsPosted on 2009-03-25 at 07:26:55ID: 23979768

Missed the attach!

 

by: jjamstrongPosted on 2009-03-25 at 08:10:45ID: 23980351

can you browse the page locally on the server???

 

by: naspsPosted on 2009-03-25 at 08:34:59ID: 23980749

Hi jjarmstrong

Actually, and reading your message I runned the website on the server side and it gives me another error message, diferent from the client side.
See Code Snippet

Server Error in '/' Application.
--------------------------------------------------------------------------------
 
Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
 
Parser Error Message: The 'assemblies' start tag on line 27 does not match the end tag of 'system.web'. Line 87, position 230.
 
Source Error: 
 
 
Line 85:    </providers>
Line 86:   </membership>
Line 87: 	<!--<httpHandlers><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers>--></system.web>
Line 88:        <location allowOverride="true" inheritInChildApplications="true">
Line 89:            <appSettings>
 
 
Source File: C:\Inetpub\wwwroot\CCP\web.config    Line: 87 
 
 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:

Select allOpen in new window

 

by: jjamstrongPosted on 2009-03-25 at 08:47:06ID: 23980922

Attach your web.config file. If it doesn't let you, copy the content to a .txt file and attach it that way.

 

by: naspsPosted on 2009-03-25 at 08:49:31ID: 23980967

Here goes!

 

by: jjamstrongPosted on 2009-03-25 at 09:07:34ID: 23981212

you commented a part of your web.config file that you didn't have to.

Add these two lines just after the <add assembly=" section in your web config
      </assemblies>
    </compilation>

It has to stay exactly like the code below because you open the <compilation> and the <assemblies> TAGS so you have to close them. The problem is that you comented them and that's why it is giving you that problem.

<compilation debug="true" strict="false" explicit="true">
  <assemblies>
    <!--		<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
		<add assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
		<add assembly="CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
		<add assembly="CrystalDecisions.ReportSource, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
		<add assembly="CrystalDecisions.Enterprise.Framework, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
		<add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
		<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
		<add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
-->
  </assemblies>
</compilation>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:

Select allOpen in new window

 

by: jjamstrongPosted on 2009-03-25 at 09:10:50ID: 23981254

This is the way the web.config file should be. Copy the content to your web.config file

 

by: naspsPosted on 2009-03-25 at 10:01:32ID: 23981934

I've made the changes and it runned the first login.aspx page to input username and password.
After that input the error page is the one on the attach.
On the VS2005 when I put this new web.config I cannot proceed with the logon - gives failure.

Any help...

 

by: jjamstrongPosted on 2009-03-25 at 10:58:39ID: 23982602

Ok well this is another problem... that pertically have to do with your connection strings. You say you are using SQL Server 2005 and ASP.NET membership in roles right? If so you have to put the same connexion string that is in your web.config file in to the Machine.config that is located in C:\Windows\Microsoft.NET\Framework\v2.0.xxxxx\CONFIG\machine.config
In this file you will fine a connection string named LocalSqlServer that has a connection to SQLExpress. You have to change that connection to you server and to the database where you generated the Membership and Roles tables.
After you get this configured right your page should work.

 

by: naspsPosted on 2009-03-25 at 11:08:38ID: 23982731

But here's the funny thing: I don't want to use SQL Server... does this error appears because the SQL Server is running on this server (the one with IIS)?
I'm using, on the login.aspx a System.Web.UI.WebControls.Login is that why this happens. I'm getting data from LDAP for usernames/passwords... (as you can see on the connection string for the LDAP
And changing the connection string won't create any problem with running SQL Aplications?

 

by: jjamstrongPosted on 2009-03-25 at 11:37:23ID: 23983064

Honestly I haven't used membership and roles with LDAP before, but to my knowlege membership and roles have to be with a Database, it even has an executable to create the database and the tables needed to use membership and roles.

If you want to use LDAP I think you will have to bill your own login portal which is a pain in the neck but it's doable. Also you can use the SQLExpress version that comes with VS 2008 which comes with VS 2005 also, ore you can download it from the web. Trust me; it will be much easier with the SQLExpress approach than trying to use LDAP and creating your own login portal.

 

by: naspsPosted on 2009-03-25 at 11:48:38ID: 23983161

Ok, I can see that using LDAP would be kind of tricky...
Ok, I', willing to go through with SQLExpress. The big problem: how? Any walkthrough?
The main purpose of using LDAP is to get the username/password of each user even when they change it. Does this SQLExpress alternative allow it? doesn't it have to get the user/pass somewhere (AD)?

You have been more than helpful.
Can you you help me out this new approach?

Thanks

 

by: jjamstrongPosted on 2009-03-25 at 11:59:48ID: 23983270

Yes it does... Membership and roles is a perfict tool provided by ASP.NET and it comes with everything necesary for it to work properly. After you do those changes that I specify with the Connection Strings you can have a look at these videos. These videos is what get me jump started with Membership and roles and I hope they be of help for you also.

Note: If you're going to use SQLExpress you don't have to make any changes to machine.config file.


How Do I: Secure my Site using Membership and Roles
http://www.asp.net/learn/videos/video-45.aspx

How Do I: Create a Full-Featured Customer Login Portal?
http://www.asp.net/learn/videos/video-47.aspx

 

by: jjamstrongPosted on 2009-03-25 at 12:16:39ID: 23983473

Ohhh sorry... this is the first video you should look at. This is the video on how to set it all up, and it includes the steps on how to create the database for the Membership and Roles Controls and any other configuration needed.

How Do I Set Up the SQL Membership Provider
http://www.asp.net/learn/videos/video-148.aspx

 

by: naspsPosted on 2009-03-26 at 04:53:28ID: 23989282

Thanks jjarmstrong,
I'm already viewing the videos. Still not quite sure how to "connect" the SQLExpress and the AD to get user/passwords... but i'll figure it out.

Man, I'm really a newbie. Get this: On my project I have defined (not sure how really) a login.aspx to be my default web page. To leave this login thing to the last stageof my develop  I've excluded the login.aspx from the tree and right-clicked the index.aspx to "Set as start page". When F5 I get the error that the /login.aspx is missing... Wasn't suposed, from now on, to be the index.aspx the first page? Do I need to configure the web.config?
What a pain in the neck...

Thanks

 

by: jjamstrongPosted on 2009-03-26 at 08:11:56ID: 23991313

I understand what you mean about the pain. But it's more of knowing what to do the being a pain. When you are using membership a roles it is mandatory that you have the login.aspx file created on the main website, not in subdirectory. Also you need to create a Default.aspx page not Index.aspx.

Asp.net with IIS recognizes the Index.aspx but I recommend that you create the Default.aspx instead of the Index.aspx. After you do this set Default.aspx as your start up page by right clicking on it and clicking on Set As Start Page. After this it should work fine

 

by: naspsPosted on 2009-03-26 at 08:33:46ID: 23991550

Just did what you've told (change index.aspx to Default.aspx, right-clicked and set it to Set as Start Page)
but it keeps giving me a bad URL (he's looking for login.aspx - see attach). I'm doing it locally.
I'm afraid that all those web.config changes we've made to get the page going, actually "blown" something.

 

by: jjamstrongPosted on 2009-03-26 at 09:25:53ID: 23992196

The space in /BasesDe Dados/login.aspx is what giving you the error. A Web project has to be created without spaces in the name. Recreated as BasesDeDatos

 

by: naspsPosted on 2009-03-26 at 09:36:20ID: 23992320

Worth the try but still the same error...
I don't get it... the login.aspx is a blank page (I've cleared all the objects) and it is excluded from the tree...and it stills asks for the login.aspx.

I'm close to start all over :(

 

by: jjamstrongPosted on 2009-03-26 at 10:04:48ID: 23992692

do not exclude the login.aspx page... it will always look for the login page... because you started with membership and roles, so in your web.config file have the configuration to look for it. Include the Login.aspx file into your project so it can work.

 

by: naspsPosted on 2009-03-26 at 10:14:06ID: 23992795

Ok,I've included once again the login.aspx in the project. Seted again Default.aspx as start page, hit F5 and the browser shows login.aspx. Weird thing is the URL. It appears that is set to redirect to Default.aspx but first...login.aspx (see attach). The button was a trial for me to pass this page by doing response.redirect("Default.aspx") but no luck...

Is it time now to start all over? :)

 

by: jjamstrongPosted on 2009-03-26 at 10:54:24ID: 23993225

You don't have to start over. I think I know what you did!!! You configured that the main site canot be accessed unless it's and autentecated user. If it is so do the following steps!

1. In the ASP.NET Configuration (whitch is in the Website menu - ASP.NET Configuration) click on the security Tab.
2. Click on Manage Access Rules
3. In the window that apper remove any rule created on your main application directory (whitch would be BasesDeDatos folder).
4. Click on the Done button (bottom right corner of the browser)

If this isn't the poblem well you may have to start over.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...