V
VB Programmer
I would appreciate your assistance on this ASP.NET 2.0 site....
This is the wierd problem: While accessing the built in .NET functions for
'profiling' or 'membership' an error is generated (see following 2
examples):
---- EXAMPLE 1 --------
OK --> Dim p As New ProfileCommon
OK --> p = Profile.GetProfile(Me.ddlRacer.SelectedItem.Text)
FAILS --> Me.lblDebug.Text = p.FirstName.ToString
---- EXAMPLE 2 --------
OK --> Dim u As MembershipUser
FAILS --> u =
System.Web.Security.Membership.GetUser(Me.ddlRacer.SelectedItem.Text)
These lines work perfectly locally. They fail after my site is published to
the webserver. I really feel this is a server related issue. Perhaps these
"libraries" are not installed correctly or something? Any ideas?
The error message is misleading and says this:
error received:
----------------------------------
server error in '/' application.
--------------------------------------------------------------------------------
an attempt to attach an auto-named database for file
c:\hosting\webhost4life\member\robertnzana\customerdomains\1320stompers\app_data\aspnetdb.mdf
failed. a database with the same name exists, or specified file cannot be
opened, or it is located on unc share.
des_crip_tion: an unhandled exception occurred during the execution of the
current web request. please review the stack trace for more information
about the error and where it originated in the code.
exception details: system.data.sqlclient.sqlexception: an attempt to attach
an auto-named database for file
c:\hosting\webhost4life\member\robertnzana\customerdomains\1320stompers\app_data\aspnetdb.mdf
failed. a database with the same name exists, or specified file cannot be
opened, or it is located on unc share.
source error:
an unhandled exception was generated during the execution of the current web
request. information regarding the origin and location of the exception can
be identified using the exception stack trace below.
stack trace:
[sqlexception (0x80131904): an attempt to attach an auto-named database for
file
c:\hosting\webhost4life\member\robertnzana\customerdomains\1320stompers\app_data\aspnetdb.mdf
failed. a database with the same name exists, or specified file cannot be
opened, or it is located on unc share.]
system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception,
boolean breakconnection) +734995
system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject
stateobj) +188
system.data.sqlclient.tdsparser.run(runbehavior runbehavior, sqlcommand
cmdhandler, sqldatareader datastream, bulkcopysimpleresultset
bulkcopyhandler, tdsparserstateobject stateobj) +1838
system.data.sqlclient.sqlinternalconnectiontds.completelogin(boolean
enlistok) +33
system.data.sqlclient.sqlinternalconnectiontds.openloginenlist(sqlconnection
owningobject, sqlconnectionstring connectionoptions, string newpassword,
boolean redirecteduserinstance) +628
system.data.sqlclient.sqlinternalconnectiontds..ctor(dbconnectionpoolidentity
identity, sqlconnectionstring connectionoptions, object providerinfo, string
newpassword, sqlconnection owningobject, boolean redirecteduserinstance)
+170
system.data.sqlclient.sqlconnectionfactory.createconnection(dbconnectionoptions
options, object poolgroupproviderinfo, dbconnectionpool pool, dbconnection
owningconnection) +359
system.data.providerbase.dbconnectionfactory.createpooledconnection(dbconnection
owningconnection, dbconnectionpool pool, dbconnectionoptions options) +28
system.data.providerbase.dbconnectionpool.createobject(dbconnection
owningobject) +424
system.data.providerbase.dbconnectionpool.usercreaterequest(dbconnection
owningobject) +66
system.data.providerbase.dbconnectionpool.getconnection(dbconnection
owningobject) +496
system.data.providerbase.dbconnectionfactory.getconnection(dbconnection
owningconnection) +82
system.data.providerbase.dbconnectionclosed.openconnection(dbconnection
outerconnection, dbconnectionfactory connectionfactory) +105
system.data.sqlclient.sqlconnection.open() +111
system.web.dataaccess.sqlconnectionholder.open(httpcontext context, boolean
revertimpersonate) +84
system.web.dataaccess.sqlconnectionhelper.getconnection(string
connectionstring, boolean revertimpersonation) +197
system.web.security.sqlmembershipprovider.getpasswordwithformat(string
username, boolean updatelastloginactivitydate, int32& status, string&
password, int32& passwordformat, string& passwordsalt, int32&
failedpasswordattemptcount, int32& failedpasswordanswerattemptcount,
boolean& isapproved, datetime& lastlogindate, datetime& lastactivitydate)
+1121
system.web.security.sqlmembershipprovider.checkpassword(string username,
string password, boolean updatelastloginactivitydate, boolean
failifnotapproved, string& salt, int32& passwordformat) +105
system.web.security.sqlmembershipprovider.checkpassword(string username,
string password, boolean updatelastloginactivitydate, boolean
failifnotapproved) +42
system.web.security.sqlmembershipprovider.validateuser(string username,
string password) +83
system.web.ui.webcontrols.login.onauthenticate(authenticateeventargs e) +160
system.web.ui.webcontrols.login.attemptlogin() +105
system.web.ui.webcontrols.login.onbubbleevent(object source, eventargs e)
+99
system.web.ui.control.raisebubbleevent(object source, eventargs args) +35
system.web.ui.webcontrols.button.oncommand(commandeventargs e) +115
system.web.ui.webcontrols.button.raisepostbackevent(string eventargument)
+163
system.web.ui.webcontrols.button.system.web.ui.ipostbackeventhandler.raisepostbackevent(string
eventargument) +7
system.web.ui.page.raisepostbackevent(ipostbackeventhandler sourcecontrol,
string eventargument) +11
system.web.ui.page.raisepostbackevent(namevaluecollection postdata) +33
system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint,
boolean includestagesafterasyncpoint) +5102
This is the wierd problem: While accessing the built in .NET functions for
'profiling' or 'membership' an error is generated (see following 2
examples):
---- EXAMPLE 1 --------
OK --> Dim p As New ProfileCommon
OK --> p = Profile.GetProfile(Me.ddlRacer.SelectedItem.Text)
FAILS --> Me.lblDebug.Text = p.FirstName.ToString
---- EXAMPLE 2 --------
OK --> Dim u As MembershipUser
FAILS --> u =
System.Web.Security.Membership.GetUser(Me.ddlRacer.SelectedItem.Text)
These lines work perfectly locally. They fail after my site is published to
the webserver. I really feel this is a server related issue. Perhaps these
"libraries" are not installed correctly or something? Any ideas?
The error message is misleading and says this:
error received:
----------------------------------
server error in '/' application.
--------------------------------------------------------------------------------
an attempt to attach an auto-named database for file
c:\hosting\webhost4life\member\robertnzana\customerdomains\1320stompers\app_data\aspnetdb.mdf
failed. a database with the same name exists, or specified file cannot be
opened, or it is located on unc share.
des_crip_tion: an unhandled exception occurred during the execution of the
current web request. please review the stack trace for more information
about the error and where it originated in the code.
exception details: system.data.sqlclient.sqlexception: an attempt to attach
an auto-named database for file
c:\hosting\webhost4life\member\robertnzana\customerdomains\1320stompers\app_data\aspnetdb.mdf
failed. a database with the same name exists, or specified file cannot be
opened, or it is located on unc share.
source error:
an unhandled exception was generated during the execution of the current web
request. information regarding the origin and location of the exception can
be identified using the exception stack trace below.
stack trace:
[sqlexception (0x80131904): an attempt to attach an auto-named database for
file
c:\hosting\webhost4life\member\robertnzana\customerdomains\1320stompers\app_data\aspnetdb.mdf
failed. a database with the same name exists, or specified file cannot be
opened, or it is located on unc share.]
system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception,
boolean breakconnection) +734995
system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject
stateobj) +188
system.data.sqlclient.tdsparser.run(runbehavior runbehavior, sqlcommand
cmdhandler, sqldatareader datastream, bulkcopysimpleresultset
bulkcopyhandler, tdsparserstateobject stateobj) +1838
system.data.sqlclient.sqlinternalconnectiontds.completelogin(boolean
enlistok) +33
system.data.sqlclient.sqlinternalconnectiontds.openloginenlist(sqlconnection
owningobject, sqlconnectionstring connectionoptions, string newpassword,
boolean redirecteduserinstance) +628
system.data.sqlclient.sqlinternalconnectiontds..ctor(dbconnectionpoolidentity
identity, sqlconnectionstring connectionoptions, object providerinfo, string
newpassword, sqlconnection owningobject, boolean redirecteduserinstance)
+170
system.data.sqlclient.sqlconnectionfactory.createconnection(dbconnectionoptions
options, object poolgroupproviderinfo, dbconnectionpool pool, dbconnection
owningconnection) +359
system.data.providerbase.dbconnectionfactory.createpooledconnection(dbconnection
owningconnection, dbconnectionpool pool, dbconnectionoptions options) +28
system.data.providerbase.dbconnectionpool.createobject(dbconnection
owningobject) +424
system.data.providerbase.dbconnectionpool.usercreaterequest(dbconnection
owningobject) +66
system.data.providerbase.dbconnectionpool.getconnection(dbconnection
owningobject) +496
system.data.providerbase.dbconnectionfactory.getconnection(dbconnection
owningconnection) +82
system.data.providerbase.dbconnectionclosed.openconnection(dbconnection
outerconnection, dbconnectionfactory connectionfactory) +105
system.data.sqlclient.sqlconnection.open() +111
system.web.dataaccess.sqlconnectionholder.open(httpcontext context, boolean
revertimpersonate) +84
system.web.dataaccess.sqlconnectionhelper.getconnection(string
connectionstring, boolean revertimpersonation) +197
system.web.security.sqlmembershipprovider.getpasswordwithformat(string
username, boolean updatelastloginactivitydate, int32& status, string&
password, int32& passwordformat, string& passwordsalt, int32&
failedpasswordattemptcount, int32& failedpasswordanswerattemptcount,
boolean& isapproved, datetime& lastlogindate, datetime& lastactivitydate)
+1121
system.web.security.sqlmembershipprovider.checkpassword(string username,
string password, boolean updatelastloginactivitydate, boolean
failifnotapproved, string& salt, int32& passwordformat) +105
system.web.security.sqlmembershipprovider.checkpassword(string username,
string password, boolean updatelastloginactivitydate, boolean
failifnotapproved) +42
system.web.security.sqlmembershipprovider.validateuser(string username,
string password) +83
system.web.ui.webcontrols.login.onauthenticate(authenticateeventargs e) +160
system.web.ui.webcontrols.login.attemptlogin() +105
system.web.ui.webcontrols.login.onbubbleevent(object source, eventargs e)
+99
system.web.ui.control.raisebubbleevent(object source, eventargs args) +35
system.web.ui.webcontrols.button.oncommand(commandeventargs e) +115
system.web.ui.webcontrols.button.raisepostbackevent(string eventargument)
+163
system.web.ui.webcontrols.button.system.web.ui.ipostbackeventhandler.raisepostbackevent(string
eventargument) +7
system.web.ui.page.raisepostbackevent(ipostbackeventhandler sourcecontrol,
string eventargument) +11
system.web.ui.page.raisepostbackevent(namevaluecollection postdata) +33
system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint,
boolean includestagesafterasyncpoint) +5102