CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: NewsGroup Date Entered: 6/5/2007 6:48:03 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 47 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
trancehead
Asp.Net User
Custom Type won't work in Profile properties6/5/2007 6:48:03 AM

0/0

Hi,

This is my first VS Web application and after the profile properties problems I'm having it might be the last. I now have the Webprofile class solution implemented and all is almost well.

In my web.config I have the following:
 

<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="connDatabase" applicationName="wineGate"/>
</providers>
<properties>
<add name="FirstName" type="System.String" allowAnonymous="true" />
<add name="LastName" type="System.String" allowAnonymous="true" />
<add name="Cart" type="ShoppingCart" serializeAs="Binary"/>
</properties>
</profile>
<anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookieSlidingExpiration="true" cookieProtection="All" cookieless="AutoDetect" />
 
With the Shopping Cart class as follows (it is just a test class):
 
<Serializable()> _
Public Class ShoppingCart
Private PID As String

Public Property
ProdictID() As String
Get
Return
PID
End Get
Set
(ByVal value As String)
PID = value
End Set
End Property

End Class
But when I run it I get the following error: 

Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'ShoppingCart' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 17: public class ProfileCommon : System.Web.Profile.ProfileBase {
Line 18:     
Line 19:     public virtual ShoppingCart Cart {
Line 20:         get {
Line 21:             return ((ShoppingCart)(this.GetPropertyValue("Cart")));


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\App_Code.qpgjuzi7.0.cs    Line: 19


Show Detailed Compiler Output:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\assembly\dl3\ada0c2fb\00d31778_bd89c701\SubSonic.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\assembly\dl3\18fbe461\00bff9e2_9f1ec701\AJAXExtensionsToolbox.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\assembly\dl3\ee42ee84\e6836fb9_d6a6c701\wineGate.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\assembly\dl3\bfceb26b\006e4b2b_5f53c601\UrlRewritingNet.UrlRewriter.DLL" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\App_Code.qpgjuzi7.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\App_Code.qpgjuzi7.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\App_Code.qpgjuzi7.1.cs"


Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727 Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6081676c\31819704\App_Code.qpgjuzi7.0.cs(19,20): error CS0246: The type or namespace name 'ShoppingCart' could not be found (are you missing a using directive or an assembly reference?)


Show Complete Compilation Source:

Line 1:    //------------------------------------------------------------------------------
Line 2:    // <auto-generated>
Line 3:    //     This code was generated by a tool.
Line 4:    //     Runtime Version:2.0.50727.42
Line 5:    //
Line 6:    //     Changes to this file may cause incorrect behavior and will be lost if
Line 7:    //     the code is regenerated.
Line 8:    // </auto-generated>
Line 9:    //------------------------------------------------------------------------------
Line 10:   
Line 11:   using System;
Line 12:   using System.Web;
Line 13:   using System.Web.Profile;
Line 14:   
Line 15:   
Line 16:   
Line 17:   public class ProfileCommon : System.Web.Profile.ProfileBase {
Line 18:       
Line 19:       public virtual ShoppingCart Cart {
Line 20:           get {
Line 21:               return ((ShoppingCart)(this.GetPropertyValue("Cart")));
Line 22:           }
Line 23:           set {
Line 24:               this.SetPropertyValue("Cart", value);
Line 25:           }
Line 26:       }
Line 27:       
Line 28:       public virtual string LastName {
Line 29:           get {
Line 30:               return ((string)(this.GetPropertyValue("LastName")));
Line 31:           }
Line 32:           set {
Line 33:               this.SetPropertyValue("LastName", value);
Line 34:           }
Line 35:       }
Line 36:       
Line 37:       public virtual string FirstName {
Line 38:           get {
Line 39:               return ((string)(this.GetPropertyValue("FirstName")));
Line 40:           }
Line 41:           set {
Line 42:               this.SetPropertyValue("FirstName", value);
Line 43:           }
Line 44:       }
Line 45:       
Line 46:       public virtual ProfileCommon GetProfile(string username) {
Line 47:           return ((ProfileCommon)(ProfileBase.Create(username)));
Line 48:       }
Line 49:   }
Line 50:   

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I ma absolutely flumoxed as I can't figure out why it can't find the type or namespace.


Increase your wine sales - www.winecommerce.co.za
trancehead
Asp.Net User
Re: Custom Type won't work in Profile properties6/7/2007 7:26:36 AM

0/0

I fixed it myself. For anyone else who may have a similiar problem, remember the web.config is case sensitive. That means ShoppingCart and shoppingcart are two different types. This happens even if you are coding in VB. 


Increase your wine sales - www.winecommerce.co.za
Nicsam
Asp.Net User
Re: Custom Type won't work in Profile properties12/6/2007 11:15:27 AM

0/0

 Im a novice to the Personalization concept.

So i was doing a similar example to study the Profile concept.

Suddenly i got an error saying "this property can not be set for anonymous user"..

So i searched an answer for this to fix, so i reached your comment about this .

After putting the "allowAnonymous="true"" and "<anonymousIdentification enabled="true"/>" 

i was able to fix the error and was able to continue my study...

Thanks for your comment.

Nicsam 

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Alan Simpson's Windows Vista Bible Authors: Alan Simpson, Todd Meister, Pages: 1176, Published: 2007
The Administrator's Guide to SharePoint Portal Server 2001 Authors: Bill English, Pages: 464, Published: 2002
Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Authors: Brennan Stehling, Pages: 408, Published: 2007
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Microsoft SharePoint Server 2007 Bible Authors: Wynne Leon, Wayne Tynes, Simeon Cathey, Pages: 792, Published: 2007
Essential ASP.Net 2.0 Authors: Fritz Onion, Keith Brown, Pages: 345, Published: 2006
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006
Windows Vista: The Complete Reference Authors: John R. Levine, Margaret Levine Young, Pages: 733, Published: 2007
Expert One-on-One J2EE Design and Development: J2EE Design and Development Authors: Rod Johnson, Pages: 742, Published: 2002

Web:
Custom Type won't work in Profile properties - ASP.NET Forums This is my first VS Web application and after the profile properties problems I' m having it might be the last. I now have the Webprofile ...
ASP.NET 2.0: Manage Web Users With Custom Profile Providers You may also specify the data type and a default value for each property. .... Since you won't be able to pull the profile on users not logged in, ...
SharePoint 2007 Utility #1 - ProfilePropertyMgr - Utility to ... Import Profile properties from an XML file to SharePoint. ... Anything that is Read/Write, is value-type (or string), and doesn't start with "SSP-" ...
STSADM Custom Extensions: Importing Profile Properties Aug 14, 2008 ... 129: string type = propXml.SelectSingleNode("Type").InnerText; .... 216: // Settng choice list values doesn't mark the property as dirty so ...
Accessing Custom Profile Properties with Listx > Forums > Bi4ce ... If I create a new Profile Property called "MyNewProperty" that is a ... I don't think that those tags work with the newer versions of DNN. ...
WebLog Expert Help - Profile Properties Date & Time - custom date and time settings for this profile. By default settings from the program ... This option doesn't work in the command line mode.
Marco Bellinaso's Blog - An excerpt from Chapter 4: Setting Up and ... Apr 13, 2006 ... Having a class dynamically generated by Visual Studio 2005 with all the custom profile properties (and the IntelliSense for them) doesn’t ...
Example project needed - VWD, SQLtableprofileprovider, and custom ... I still haven't had any luck with the SQLtableProfileProvider and custom profile property data types. Has anyone else been able to use them ...
DotNetNuke > Community > Blogs Any ideas on how I can delete the new property? The links don't work. ... lot of users that would like to be able to use DATE fields in the custom profile. ...
Custom Profile Property - List > DotNetNuke Forum, DNN Creative ... I created a custom profile property in DNN 4.5.5. It is a List type of property. My problem is that the list topics don't display.

Videos:
Classic Luke Hadley wrestling Classic Luke Hadley wrestling. http:www.lukehadley.com DVLH World Wrestling Entertainment, Inc. (WWE) is a publicly traded, privately controlled inte...
www.moldytoaster.com and I don't hold anyone accountable for not being interested, but if you make the choice not to understand you invalidate your opinion on the matter....
www.moldytoaster.com Marked as spam 0 Good comment Poor comment Reply MojoKhan DOES NOT REFUTE ANYTHING logicaly and only comes up with rhetoric. The other Athiests ha...
www.moldytoaster.com think, would not be the place to get it... MORE fullbag50 (10 months ago) Show Hide Marked as spam 0 Good comment Poor comment Reply Atheists only...




Search This Site:










hi plz its very urgent...

storing current time in a database table

i'm just getting started

how to convert char[] to string

session bridge - asp to asp.net

using instr, mid functions to search for double quotes

request.querystring("topicid").tostring

an odd parser error

partial validation by some controls only

asp.net to asp code question

accessing the serial port using asp

postback to a href

my first web page

non admin - rights to approve new users

performance issues with database hits

object orientation articles?

file transfer asp.net

working between unix and windows

is a partial implementation of asp.net practical?

dataadapter

how to connect a database-field to an input-field

how to initate postback on checked radio button?

file upload problem

datetime formatted to clients regional settings???

clear out the session values that were on the form

exclude certain fields from csv file. how?!?

replace funcation

modechanging attribute

sessions and database accesses

got an error and have no clue

  Privacy | Contact Us
All Times Are GMT