can you browse the page locally on the server???
Main Topics
Browse All TopicsHi 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
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
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.
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.
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.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
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.
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.
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\F
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.
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.
And changing the connection string won't create any problem with running SQL Aplications?
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.
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
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/le
How Do I: Create a Full-Featured Customer Login Portal?
http://www.asp.net/
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/v
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
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
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.
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
Is it time now to start all over? :)
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.
Business Accounts
Answer for Membership
by: naspsPosted on 2009-03-25 at 07:26:55ID: 23979768
Missed the attach!