Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 8th, 2007, 12:39 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default login won't work on host--but does in devel.

I am SO close. This is my first app that I have done. I am using Visual Studio 2005 and Sql Server 2005. I was originally using two databases (my own called knights_db.mdf) and then aspnetdb.mdf for role management, etc.

Well, Godaddy only supports one database, so I was able to combine these into one--and it works GREAT in development. I went through using the MS SQL Publisher tool to create a .sql script--only problem is that I had to convert to SQL 2000, because Godaddy doesn't support 2005 yet.

So--long story short, I am using login controls (using login/role management) and using a sitemap that hides the two directories that I am controlling access to. I have an admin role and a member role. I have an admin and a member folder. (obviously admins can get in admin or member directories). Again, this works perfect in development.

Ok--so I FINALLY get the DB up and running. The one database (I have combined both into aspnetdb.mdf) is working, as there is dynamic code on the first page that works fine. The problem is that when a user logs in, it just refreshes the screen. I have a loginview and it never registers the correct login. Now, when I use an invalid password, it does give me an error (like it should) stating invalid password ( www.kofc1913.org )

Below is my web.config file and my sitemap. Please keep in mind this is my first site and I am a novice at this. Could this be because I am using SQL Server 2000, rather than 2005? If so, how can I fix that? Or does something else appear wrong.

 This is my LAST step to getting this finally complete....any help would be much appreciated!

******************************
WEB.CONFIG FILE
******************************

<?xml version="1.0" encoding="utf-8"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>

<remove name="LocalSqlServer" />

<add name="LocalSqlServer" connectionString="Data Source=p3swhsql-v01.shr.phx3.secureserver.net;Initial Catalog=DB_1002017;User ID=userID;Password='mypassword'"

providerName="System.Data.SqlClient" />

</connectionStrings>

<system.web>

<roleManager enabled="true" />

<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">

<providers>

<clear/>

<add name="XmlSiteMapProvider"

description="Default SiteMap provider."

type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

siteMapFile="Web.sitemap"

securityTrimmingEnabled="true" />

</providers>

</siteMap>

<membership>

<providers>

<clear />

<add name="AspNetSqlMembershipProvider"

type="System.Web.Security.SqlMembershipProvider, System.Web,

Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

connectionStringName="LocalSqlServer"

enablePasswordRetrieval="true"

enablePasswordReset="true"

requiresQuestionAndAnswer="false"

applicationName="/"

requiresUniqueEmail="false"

passwordFormat="Encrypted"

maxInvalidPasswordAttempts="5"

passwordAttemptWindow="10"

passwordStrengthRegularExpression=""

minRequiredNonalphanumericCharacters="0"

minRequiredPasswordLength="6"

/>

</providers>

</membership>

<machineKey validationKey='something' decryptionKey='something' validation='SHA1'/>

<compilation debug="true"/>

</system.web>

</configuration>

****************
web.sitemap
****************



<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode title="Home" description="Homepage" url="~/Default.aspx">

<siteMapNode title="About Us" description="About" url="~/aboutus.aspx"/>

<siteMapNode title="Structure" description="council" url="~/cstructure.aspx"/>

<siteMapNode title="Pics" description="pictures" url="~/viewpics.aspx"/>

<siteMapNode title="Login" description="login" url="~/login.aspx"/>

<siteMapNode title="Members" description="members" url="~/Member/member.aspx">

<siteMapNode title="Enroll In Event" description="enroll events" url="~/Member/enrollevent.aspx"></siteMapNode>

</siteMapNode>

<siteMapNode title="Admin" description = "Admin" url="~/Admin/admin.aspx">

<siteMapNode title="Members" description = "Add/Edit Member" url="~/Admin/addmember.aspx"/>

<siteMapNode title="Events" description = "Add Events" url="~/Admin/addevent.aspx"/>

<siteMapNode title="Check Enrolls" description = "Check Enrollments" url="~/Admin/checkenrolls.aspx"/>

<siteMapNode title="Add Pictures" description = "Add Pictures" url="~/Admin/addpics.aspx"/>

</siteMapNode>

</siteMapNode>

</siteMap>



Please help!
Kind Regards,
Rob


 
Old February 8th, 2007, 05:13 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Rob,

Can you list the data for the following tables:

aspnet_Applications
aspnet_Users
aspnet_Membership
aspnet_Roles
aspnet_UserInRoles

(You can send it privately if you want)

This seems to be an issue with roles / rights not mapping to the right application....

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old February 9th, 2007, 09:15 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default

OK...after a TON of trying--Imar came in to save the day. Below is the response that fixed the problem. Thought I'd post in case someone else came upon the problem. What was odd, is that my app worked in development without this just fine--wasn't until I migrated to live host that it stopped working.

<authentication mode="Forms">
<forms loginUrl="~/Login.aspx" />
</authentication>

</system.web>

I left </system.web> in to indicate you should place the
<authentication element *before* the closing system.web element.


Regards,
Rob






Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to install Visual Studio 2005 for ASP devel dudebodacious ASP.NET 1.0 and 1.1 Basics 1 March 16th, 2008 02:44 PM
CMS - admin login does not work peppie BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 October 20th, 2007 08:46 AM
cant get beerhouse Login to work in FireFox br BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 7th, 2006 12:09 AM
Differences, Web Devel Express 2005, Normal Studio Dave Owens ASP.NET 2.0 Professional 1 December 28th, 2005 09:56 PM
Uploading to Host europhreak Dreamweaver (all versions) 2 September 25th, 2005 09:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.