[Mono-bugs] [Bug 491040] New: Browse Precompiled website(Profile enabled in web.config), Error "Cannot cast from source type to destination type."

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Apr 1 06:15:28 EDT 2009


https://bugzilla.novell.com/show_bug.cgi?id=491040


           Summary: Browse Precompiled website(Profile enabled in
                    web.config), Error "Cannot cast from source type to
                    destination type."
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: jedei at 163.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64;
NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR
3.0.4506.2152; .NET CLR 3.5.30729)

When the configuration of the Profile in web.config, Error occurred in the C#
code execution to visit the Profile property

web.config
--------------------------------------------------
    <profile enabled="true" defaultProvider="MySQLProfileProvider"
automaticSaveEnabled="false">
      <providers>
        <clear />
        <add autogenerateschema="false" connectionStringName="test_mysql"
applicationName="/" name="MySQLProfileProvider"
type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=5.2.5.0,
Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
      </providers>
      <properties>
        <add name="FullName" type="String" allowAnonymous="true"/>
      </properties>
    </profile>

Reproducible: Always

Steps to Reproduce:
1. Visual Studio 2008, From the build menu in the web site, select "Publish Web
Site".
2. Target a location which can be served from xsp2 or mod_mono
3. Ensure that "Allow this precompiled site to be updatable" is not checked
4. Click okay to publish
5. Start xsp2 / mod_mono on the target directory
6. Browse to the target page at website
Actual Results:  
Server Error in '/' Application

--------------------------------------------------------------------------------

Cannot cast from source type to destination type.
Description: HTTP 500. Error processing request.

Stack Trace: 

System.InvalidCastException: Cannot cast from source type to destination type.
  at users_profile.get_Profile () [0x00000] 
  at users_profile.Page_Load (System.Object sender, System.EventArgs e)
[0x00000] 
  at (wrapper delegate-invoke)
System.EventHandler:invoke_void__this___object_EventArgs
(object,System.EventArgs)
  at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.LoadRecursive () [0x00000] 
  at System.Web.UI.Page.ProcessLoad () [0x00000] 
  at System.Web.UI.Page.ProcessPostData () [0x00000] 
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x00000]  

--------------------------------------------------------------------------------
Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
2.0.50727.1433 

Expected Results:  
the Page can showing

public partial class users_profile : wdUserPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (null == Profile) {//This line are the cause of the problem
                return;
            } 
     }

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list