By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

ProfileCommon Runtime error using web deployment proj generated ou

P: n/a
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.ReadOnlyXmlProfileProvide r, 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(St ring 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(EventAr gs e) +105
System.Web.UI.WebControls.Login.AttemptLogin() +205
System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e)
+99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+163

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Mar 30 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I resolved this by unmarking the checkbox “Treat as library component (remove
the App_Code.compiled file)”.
Mar 30 '06 #2

P: n/a
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

Apr 24 '06 #3

P: n/a
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.

"ea********@gmail.com" 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

Apr 24 '06 #4

P: n/a
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.

"ea********@gmail.com" 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

Apr 24 '06 #5

P: n/a
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.

"ea********@gmail.com" 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

Apr 24 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.