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