Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Compiler Error when debugging ASP.NET (C#) project

Reply
Thread Tools

Compiler Error when debugging ASP.NET (C#) project

 
 
JMnich
Guest
Posts: n/a
 
      02-11-2009
Hello!

I try to concentrate on the basic facts as I suppose my problem to be.

I created a c# website having its own sitemapprovider. The code for the
provider is located in a file in App_Code. The Provider makes calls to
methods of other classes (i call them module-classes) to set up the menu
structure. The code for each of the module-classes is lying in a different
subdir of the root (!) folder - each in a different namespace. To get all
necessary information for the menu from the module-classes I defined a Class
representing one menu item and the methods of the module-classes return an
array of this MenuItemClass depending on the users permissions for that
module.

So now here's the problem: If I generate the project (which i can) and
publish it to a web server, everything works fine. If I try to debug the
project locally (what I really would like to do!) I get the following error:

CS0029: Eine implizite Konvertierung vom Typ
"posy.web.controls.PosyMenuItem[]
[c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\root\7c621665\7c8f6fd3\assembly\dl3\f9dbe31f \92d78025_685ac901\web.DLL]"
in "posy.web.controls.PosyMenuItem[] [c:\Dokumente und
Einstellungen\mnich\Desktop\posy\web\App_Code\Posy MenuItem.cs(15)]" ist nicht
möglich.

I try to translate: An implicit Conversion from type
"posy.web.controls.PosyMenuItem[]
[c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\root\7c621665\7c8f6fd3\assembly\dl3\f9dbe31f \92d78025_685ac901\web.DLL]"
to "posy.web.controls.PosyMenuItem[] [c:\Dokumente und
Einstellungen\mnich\Desktop\posy\web\App_Code\Posy MenuItem.cs(15)]" is not
possible.

The line affected is:

posy.web.controls.PosyMenuItem[] tmpArray = tmpInit.GetPosyMenuItems();

and tmpInit is defined as

posy.web.modules.communication.Init tmpInit = new
posy.web.modules.communication.Init();

and in the Class-Definition for the class
posy.web.modules.communication.Init the method is defined as

public posy.web.controls.PosyMenuItem[] GetPosyMenuItems()

Please help! I have no idea, what's going wrong here...

Thanx,
Juergen.
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      02-12-2009
On Feb 11, 8:33*am, JMnich <(E-Mail Removed)> wrote:
> Hello!
>
> I try to concentrate on the basic facts as I suppose my problem to be.
>
> I created a c# website having its own sitemapprovider. The code for the
> provider is located in a file in App_Code. The Provider makes calls to
> methods of other classes (i call them module-classes) to set up the menu
> structure. The code for each of the module-classes is lying in a different
> subdir of the root (!) folder - each in a different namespace. To get all
> necessary information for the menu from the module-classes I defined a Class
> representing one menu item and the methods of the module-classes return an
> array of this MenuItemClass depending on the users permissions for that
> module.
>
> So now here's the problem: If I generate the project (which i can) and
> publish it to a web server, everything works fine. If I try to debug the
> project locally (what I really would like to do!) I get the following error:
>
> CS0029: Eine implizite Konvertierung vom Typ
> "posy.web.controls.PosyMenuItem[]
> [c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
> Files\root\7c621665\7c8f6fd3\assembly\dl3\f9dbe31f \92d78025_685ac901\web.DL L]"
> in "posy.web.controls.PosyMenuItem[] [c:\Dokumente und
> Einstellungen\mnich\Desktop\posy\web\App_Code\Posy MenuItem.cs(15)]" ist nicht
> möglich.
>
> I try to translate: An implicit Conversion from type
> "posy.web.controls.PosyMenuItem[]
> [c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
> Files\root\7c621665\7c8f6fd3\assembly\dl3\f9dbe31f \92d78025_685ac901\web.DL L]"
> to "posy.web.controls.PosyMenuItem[] [c:\Dokumente und
> Einstellungen\mnich\Desktop\posy\web\App_Code\Posy MenuItem.cs(15)]" is not
> possible.
>
> The line affected is:
>
> posy.web.controls.PosyMenuItem[] tmpArray = tmpInit.GetPosyMenuItems();
>
> and tmpInit is defined as
>
> posy.web.modules.communication.Init tmpInit = new
> posy.web.modules.communication.Init();
>
> and in the Class-Definition for the class
> posy.web.modules.communication.Init the method is defined as
>
> public posy.web.controls.PosyMenuItem[] GetPosyMenuItems()
>
> Please help! I have no idea, what's going wrong here...
>
> Thanx,
> *Juergen.


Try to make cast to (PosyMenuItem[]) and check what value returns
tmpInit.GetPosyMenuItems(); when you debug it. Read more about error
at http://msdn.microsoft.com/en-us/libr...x5(VS.71).aspx

Hope this helps
 
Reply With Quote
 
 
 
 
JMnich
Guest
Posts: n/a
 
      02-16-2009
Thank you for your answer... but that was not the problem.

Playing around a little bit I finally found out, that without any changes to
my files (!) everything works fine, if I move the SitemapProvider-Class and
my MenuItem-Class from the App_Code-Directory to any other subdirectory.

It seems, I do not understand the exact role of the App_Code directory. Can
you tell me?

Thank you for an answer,
Juergen.


"Alexey Smirnov" wrote:

> On Feb 11, 8:33 am, JMnich <(E-Mail Removed)> wrote:
> > Hello!
> >
> > I try to concentrate on the basic facts as I suppose my problem to be.
> >
> > I created a c# website having its own sitemapprovider. The code for the
> > provider is located in a file in App_Code. The Provider makes calls to
> > methods of other classes (i call them module-classes) to set up the menu
> > structure. The code for each of the module-classes is lying in a different
> > subdir of the root (!) folder - each in a different namespace. To get all
> > necessary information for the menu from the module-classes I defined a Class
> > representing one menu item and the methods of the module-classes return an
> > array of this MenuItemClass depending on the users permissions for that
> > module.
> >
> > So now here's the problem: If I generate the project (which i can) and
> > publish it to a web server, everything works fine. If I try to debug the
> > project locally (what I really would like to do!) I get the following error:
> >
> > CS0029: Eine implizite Konvertierung vom Typ
> > "posy.web.controls.PosyMenuItem[]
> > [c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
> > Files\root\7c621665\7c8f6fd3\assembly\dl3\f9dbe31f \92d78025_685ac901\web.DL L]"
> > in "posy.web.controls.PosyMenuItem[] [c:\Dokumente und
> > Einstellungen\mnich\Desktop\posy\web\App_Code\Posy MenuItem.cs(15)]" ist nicht
> > möglich.
> >
> > I try to translate: An implicit Conversion from type
> > "posy.web.controls.PosyMenuItem[]
> > [c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
> > Files\root\7c621665\7c8f6fd3\assembly\dl3\f9dbe31f \92d78025_685ac901\web.DL L]"
> > to "posy.web.controls.PosyMenuItem[] [c:\Dokumente und
> > Einstellungen\mnich\Desktop\posy\web\App_Code\Posy MenuItem.cs(15)]" is not
> > possible.
> >
> > The line affected is:
> >
> > posy.web.controls.PosyMenuItem[] tmpArray = tmpInit.GetPosyMenuItems();
> >
> > and tmpInit is defined as
> >
> > posy.web.modules.communication.Init tmpInit = new
> > posy.web.modules.communication.Init();
> >
> > and in the Class-Definition for the class
> > posy.web.modules.communication.Init the method is defined as
> >
> > public posy.web.controls.PosyMenuItem[] GetPosyMenuItems()
> >
> > Please help! I have no idea, what's going wrong here...
> >
> > Thanx,
> > Juergen.

>
> Try to make cast to (PosyMenuItem[]) and check what value returns
> tmpInit.GetPosyMenuItems(); when you debug it. Read more about error
> at http://msdn.microsoft.com/en-us/libr...x5(VS.71).aspx
>
> Hope this helps
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged. windows 2003 server Claude seraphin ASP .Net 12 02-15-2014 04:29 PM
Compiler Error Message: The compiler failed with error code -1073741819 Ram ASP .Net 0 09-13-2005 09:52 AM
Error while trying to run project: Unable to start debugging on the web server. The project is not configured Ken Stealth ASP .Net 2 01-31-2004 05:46 PM
Got error msg while Debugging : Error while trying to run project: ... ^CrazyCoder^ ASP .Net 3 09-15-2003 09:40 AM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM



Advertisments