ProfileCommon Runtime error using web deployment proj generated ou

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
 
G

Guest

I resolved this by unmarking the checkbox “Treat as library component (remove
the App_Code.compiled file)â€.
 
E

eakmeemana

Hi : i go exactly the same problem. can you please tell me where i can
find this check box ('Treat as library component '). i can't find it on
publish window or project properties.

thanks
eric
 
G

Guest

We received this exact same message when running our web deployment on a
Windows 2003 Server. The web site communicates with another 2003 server with
SQL Server 2005; it houses the aspnet database. We looked at our deployment
project and had not clicked the checkbox.

Any assistance would be greatly appreciated.
 
G

Guest

I was receiving this error when trying to execute the output of a web
deployment project. If you right-click the web deployment project, then
click Property Pages, then select Output Assemblies, the "Treat as library
component" checkbox is underneath the "Merge all outputs to a single
assembly" radio button. Hope this helps.
 
G

Guest

Our deployment project was already compiled without the checkbox marked. Can
you think of anything else that was modified on the server or your deployment
project that resolved the issue?
 
Joined
Aug 11, 2007
Messages
1
Reaction score
0
try moving everything from the bin directory over again (all dlls). It worked for me.


=?Utf-8?B?TSBIYW1tZXR0?= said:
Our deployment project was already compiled without the checkbox marked. Can
you think of anything else that was modified on the server or your deployment
project that resolved the issue?

"Lynne" wrote:

> I was receiving this error when trying to execute the output of a web
> deployment project. If you right-click the web deployment project, then
> click Property Pages, then select Output Assemblies, the "Treat as library
> component" checkbox is underneath the "Merge all outputs to a single
> assembly" radio button. Hope this helps.
>
> "(e-mail address removed)" wrote:
>
> > Hi : i go exactly the same problem. can you please tell me where i can
> > find this check box ('Treat as library component '). i can't find it on
> > publish window or project properties.
> >
> > thanks
> > eric
> >
> >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top