G
Guest
I apologize in advance for the lengthy message but wanted to include as much
information as possible. Any insight/assistance would be appreciated.
The following line of code throws an error when I execute my application
using the output generated from a web deployment project. I have specified
"merge all outputs to a single assembly." If I use the "publish web site"
option, the application works fine. If I run the application within Visual
Studio, everything works fine. If I use a web setup project for deployment,
everything works fine. It is only a problem when executing the output from
the web deployment project.
ProfileCommon pc = Profile.GetProfile(this.UserName);
The web.config file contains the following:
<profile enabled="true"
defaultProvider="AspNetReadOnlyXmlProfileProvider">
<providers>
<add name="AspNetReadOnlyXmlProfileProvider"
type="Framework.Security.ReadOnlyXmlProfileProvider, Framework.UI"
description="Read-only Xml File-based profile provider"
xmlFileName="~/App_Data/Users.xml"/>
</providers>
<properties>
<add name="FirstName" type="string"/>
<add name="LastName" type="string"/>
<add name="Title" type="string"/>
</properties>
</profile>
The following is the error:
Value cannot be null.
Parameter name: type
Description: 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.ArgumentNullException: Value cannot be null.
Parameter name: type
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:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +2797139
System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean
isAuthenticated) +76
System.Web.Profile.ProfileBase.Create(String username, Boolean
isAuthenticated) +312
System.Web.HttpContext.get_Profile() +89
_Default.labUserLogin_OnLoggedIn(Object sender, EventArgs e) +91
System.Web.UI.WebControls.Login.OnLoggedIn(EventArgs e) +105
System.Web.UI.WebControls.Login.AttemptLogin() +205
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
information as possible. Any insight/assistance would be appreciated.
The following line of code throws an error when I execute my application
using the output generated from a web deployment project. I have specified
"merge all outputs to a single assembly." If I use the "publish web site"
option, the application works fine. If I run the application within Visual
Studio, everything works fine. If I use a web setup project for deployment,
everything works fine. It is only a problem when executing the output from
the web deployment project.
ProfileCommon pc = Profile.GetProfile(this.UserName);
The web.config file contains the following:
<profile enabled="true"
defaultProvider="AspNetReadOnlyXmlProfileProvider">
<providers>
<add name="AspNetReadOnlyXmlProfileProvider"
type="Framework.Security.ReadOnlyXmlProfileProvider, Framework.UI"
description="Read-only Xml File-based profile provider"
xmlFileName="~/App_Data/Users.xml"/>
</providers>
<properties>
<add name="FirstName" type="string"/>
<add name="LastName" type="string"/>
<add name="Title" type="string"/>
</properties>
</profile>
The following is the error:
Value cannot be null.
Parameter name: type
Description: 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.ArgumentNullException: Value cannot be null.
Parameter name: type
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:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +2797139
System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean
isAuthenticated) +76
System.Web.Profile.ProfileBase.Create(String username, Boolean
isAuthenticated) +312
System.Web.HttpContext.get_Profile() +89
_Default.labUserLogin_OnLoggedIn(Object sender, EventArgs e) +91
System.Web.UI.WebControls.Login.OnLoggedIn(EventArgs e) +105
System.Web.UI.WebControls.Login.AttemptLogin() +205
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