CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 1/7/2008 7:14:11 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 19 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
ChadThiele
Asp.Net User
Problems with Deployed ASP.NET Membership1/7/2008 7:14:11 AM

0/0

I've got a website that has a ControlPanel directory. The control panel has a web.config in it that restricts access to the controlpanel folder to only the admin role. I have a login.aspx in the root of the site, with a login control on it. Pretty much the most basic ASP.NET authentication scheme. In the root web.config I set the application name and then used the built-in admin website to ensure the database was setup for membership.

Running the built in web server, the web site runs fine. Logins work perfectly. However, once deployed I get an error. It's as if the web site is trying to find a .mdf file on the D: drive of my web host. The SQL server is separate from the web server on the host. My web.config connection strings reflect this, I comment out the local connection string, and ensure the connection string for the remote SQL server was correct.

I think I've deduced it down to the asp.net authentication/membership part of the framework... if I delete the web.config inside the controlpanel folder, I am able to access the control panel, perform admin functions, and all database calls work fine. It's only when the folder requires login that it throws an exception.

Any ideas?

TIA
 


Did I answer your question(s)? Phweew...
ChadThiele
Asp.Net User
Re: Problems with Deployed ASP.NET Membership1/9/2008 4:48:23 AM

0/0

I guess I wasn't able to word my problem description well. I basically need to know why the app is trying to load a .mdf file when logging in/accessing a role-restricted section of my website. The web.config doesn't contain any local connection strings, only the remote SQL server's connection string.

Anything jump to mind that I should check first?


Did I answer your question(s)? Phweew...
XiaoYong Dai –
Asp.Net User
Re: Problems with Deployed ASP.NET Membership1/9/2008 10:35:56 AM

0/0

ChadThiele:

I basically need to know why the app is trying to load a .mdf file when logging in/accessing a role-restricted section of my website. The web.config doesn't contain any local connection strings, only the remote SQL server's connection string.

Hi

For investigation, could you paste your web.config file?


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
ChadThiele
Asp.Net User
Re: Problems with Deployed ASP.NET Membership1/11/2008 7:18:16 AM

0/0

 Yes, I will post it when I get home from work today. I'll simply edit this post to add it in. Thanks!


Did I answer your question(s)? Phweew...
ChadThiele
Asp.Net User
Re: Problems with Deployed ASP.NET Membership1/17/2008 3:19:59 PM

0/0

 

<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="ASPNETDBConnectionString" connectionString="Data Source=SQLServerFQDN;Initial Catalog=DBName;user=UsrName;pwd=Pass;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<roleManager enabled="true" />
<compilation debug="false">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/></assemblies>
</compilation>
<authentication mode="Forms"/>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
<membership>
<providers>
<add connectionStringName="ASPNETDBConnectionString" applicationName="/" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" name="CustomizedProvider" type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/warnaserror-" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
</compiler>
</compilers>
</system.codedom>
</configuration>

  

Thanks in advance... I hope it's just some dumb thing I've overlooked. I'd love to get this working soon. Really appreciate the help.
 


Did I answer your question(s)? Phweew...
dune44
Asp.Net User
Re: Problems with Deployed ASP.NET Membership1/17/2008 9:34:42 PM

0/0

I have a similar problem, are you by chance getting an Error: 26?

XiaoYong Dai –
Asp.Net User
Re: Problems with Deployed ASP.NET Membership1/18/2008 12:22:29 PM

0/0

ChadThiele:


 <connectionStrings>
<add name="ASPNETDBConnectionString" connectionString="Data Source=SQLServerFQDN;Initial Catalog=DBName;user=UsrName;pwd=Pass;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<roleManager enabled="true" />

<membership>

   <providers>
    <add connectionStringName="ASPNETDBConnectionString" applicationName="/"
     minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0"
     name="CustomizedProvider" type="System.Web.Security.SqlMembershipProvider" />
   </providers>
  </membership>

Hi

From your description, web app doesn't connect to a proper SQL Server database. Please specify the defaultProvider property and see if it helps.

    <roleManager enabled="true" defaultProvider="AspNetRoleProvider">

      <providers>

        <clear/>

        <add name="AspNetRoleProvider"
                connectionStringName="LocalSqlServer" *************specify connectionStringName**********
                applicationName="/formview" *************specify proper applicationName**********

                type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </providers>

    </roleManager>
    <membership defaultProvider="AspNetSqlMembershipProvider">


      <providers>
        <remove name="AspNetSqlMembershipProvider" />
        <add name="AspNetSqlMembershipProvider"
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             connectionStringName="LocalSqlServer" *************specify connectionStringName**********
             minRequiredNonalphanumericCharacters="0"
             requiresQuestionAndAnswer="true"
             minRequiredPasswordLength="2"
             passwordFormat="Hashed"
             applicationName="/formview" *************specify proper applicationName**********
             />
      </providers>
    </membership>

Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering ASP.NET with C# Authors: A. Russell Jones, Pages: 816, Published: 2002
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
Professional IIS 7 Authors: Ken Schaefer, Jeff Cochran, Scott Forsyth, Rob Baugh, Mike Everest, Dennis Glendenning, Pages: 812, Published: 2008
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008
ASP.NET 2.0 Black Book: black book Authors: Dreamtech Software, Dreamtech Software, Charul Shukla, Anil Kumar Barnwal, Dreamtech Software India, Pages: 1167, Published: 2006
ASP.NET for Web Designers Authors: Peter Ladka, Pages: 648, Published: 2002

Web:
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security ... I have a problem here. I am working on a project using ONLY Oracle database 10g Express edition and asp.net 2.0. I want to use the ASP.NET 2.0 Membership ...
ASP.NET Application deployment problems - IIS.net Thread: ASP.NET Application deployment problems. Last post 05-30-2008 8:24 AM by tomkmvp. 4 replies. Average Rating Rate It (5)Thank you for ...
problem on deployment : app_data. - newbie question. - ASP.NET Forums aspnetdb.mdf is a SQL database file that contains your membership data. ... Voted 2008, 2007, 2006 & 2005 Best ASP.NET Web Hosting by asp.netPRO Magazine ...
ASP.NET: ASP.NET 2.0 Website Programming: Problem - Design ... NET 2.0 Website Programming: Problem - Design - Solution (ISBN: 0764584642 ); Professional ASP.NET 2.0 Security, Membership, and Role Management (ISBN: ...
How To: Perform a Security Deployment Review for ASP.NET 2.0 NET membership, attempts to tamper with or reuse forms authentication tickets, ...... For example, if you have a problem with ASP.NET security features ...
ASP.Net 2.0 deployment problem - .NET ASP ASP.Net 2.0 deployment problem. Get answers to your questions in our .NET ASP forum.
ASP.NET 2.0 Application Deployment in the real world (mine But # 2 is a problem there as well. To address look into using the StateService for Session data. re: ASP.NET 2.0 Application Deployment in the real world ...
(2.0) Membership not working on deployed site Talk about (2.0) Membership not working on deployed site. ... I have the same problem. Have also posted on ASP.NET forums. ...
Deploying ASP.NET Applications After creating and testing your ASP.NET application, the next step is to deploy the application. Deployment is the process of distributing the finished ...
Bookpool: ASP.NET 2.0 Website Programming: Problem - Design - Solution ASP.NET 2.0 Programming: Problem Design Solution is aimed at describing, .... and possibly deployment and maintenance more meat then it currently gives. ...

Videos:
Ekranoplan KM 'Caspian Sea Monster' seaplane Sorry its in Russian! :( Note: The 6-engined jet at 0:40 is the Antonov 225, which is presently the largest aircraft in the world, period. Its a carg...




Search This Site:










calendar extender is too small to contail all the dates

configurationsettings.appsetting

guided tour dataaccess.vb class will not download

ssl on localhost

can a child portal be renamed?

wai accessibility and javascript (not ajax-related)

microsoft.data.odbc

any developer with indepth knowledge about databases that can make mysql provider?

ide stops the debugging

is there a default role for a new user?

placeholder and events?

requiring ssl for website when using an ssl offloader

i can't publish to an iis server

dnn noob questions......

left side cascading menu

autopostback problem/question

looking for a user profile module.

getting available systems colors to a list box in c#

securing a directory

accesing control in masterpage

problem with users display

help - skin - [solpartmenu]

web service application project and wse 3.0

validation

.aspx page html cache disable doesnot works

video streaming like www.jumpcut.com

tcpclient and securityexception

how do not apply adapter to derived controls or call original render method?

windows forms - hope to get an answer here

forms authentication / cgi-bin issue?

 
All Times Are GMT