Parser Error when running asp.net application

liunx

Guest
hi, i Download ed a sample (vb) code and try to run on my local machine, after fixed some virtual directory setting, now i get the follow error when try to run the page:


Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'barcode.WebForm1'.

Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="barcode.WebForm1"%>


so obvious it has to do with how the Inherit setting, but i Download ed this code, so I guess I can safely assume it suppose to work? maybe i forgot some other setting?

TIAhi, i Download ed a sample (vb) code and try to run on my local machine, after fixed some virtual directory setting, now i get the follow error when try to run the page:


Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'barcode.WebForm1'.

Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="barcode.WebForm1"%>


so obvious it has to do with how the Inherit setting, but i Download ed this code, so I guess I can safely assume it suppose to work? maybe i forgot some other setting?

TIA

hi, you downoaded the code, but did you compile it on your own?

i am guessing the dll is not in the bin directory.

-takhi tak,
dunno how far i am away from the true solution. but i think i've discovered the reason why it failed, was because when someone wrote asp.net application using vs.net, i need to use vb.net to "build" it first before i can deploy it. Unless it comes with the sln file (which i believe all it does is tell asp.net which files are from the same project).

Please share your thoughts on that.
Thanks for ur time for reply :)hi tak,
dunno how far i am away from the true solution. but i think i've discovered the reason why it failed, was because when someone wrote asp.net application using vs.net, i need to use vb.net to "build" it first before i can deploy it. Unless it comes with the sln file (which i believe all it does is tell asp.net which files are from the same project).

Please share your thoughts on that.
Thanks for ur time for reply :)

Solution file is for yourself only...it tells vs.net what projects you hve, kinda like your own preferene file kinda thing. ".vbproj" file is the one that holds all the file listing for that particular projects.

Like I said, you Download ed the code, did you compile it? (This also means, did you build it using vs.net, or compile it some other way).

You do NOT need vs.net to compile that code, you can just simply delete all those .vbproj, .sln, .suo...etc.. all you need are the .vb, .aspx files. Download MS.NET Framework SDK, and then you can compile it at the command prompt by typing,

vbc "C:\folderPath\*.vb"

And it will create a bin folder for you, and it will have the dll in it as well.

At that point, you can run the app in your browser wtih no problem.

-Taktak, thank you for the info.

I have few more questions for you, hope you don't mind helping this newbie out :)

1) in vs.net, what's diff between "Build Solution" (under Build) and "Start" (under Debug)? it seems both ways does compile my code right?

2) when i did what u suggested (compile *.vb in shell) do i still need to setup virtual dirtory in order to view those aspx pages, or can i browse it directly through c:\inetpub\wwwroot\.... ?

once again, thank you for ur time :)tak, thank you for the info.

I have few more questions for you, hope you don't mind helping this newbie out :)

1) in vs.net, what's diff between "Build Solution" (under Build) and "Start" (under Debug)? it seems both ways does compile my code right?

2) when i did what u suggested (compile *.vb in shell) do i still need to setup virtual dirtory in order to view those aspx pages, or can i browse it directly through c:\inetpub\wwwroot\.... ?

once again, thank you for ur time :)

Hi,

1. Build Solution - is to recompile all the projects that you have listed in your solution. Where as, start (under debug) will compile it, and then start the project for you, and allow you to run it in debug mode - that is, if you want to insert breakpoint, trace, view values at runtime..etc... you will be able to do that. Build solution just recompiles the proj in your solution file, it does not run it for you....

2. after you compile it, lets say, your src code is located at, C:\temp\, and in IIS, you can either,
a) setup your localhost to C:\temp\ - so you can just type, <!-- m --><a class="postlink" href="http://localhost/">http://localhost/</a><!-- m --> at your IE address bar, and it should be accessible (or type <!-- m --><a class="postlink" href="http://localhost/default.aspx">http://localhost/default.aspx</a><!-- m --> - type the start page naem, if you have it somewhat different or not setup). OR, you can leave your localhost setting, and just create a virtual directory, and make it point to C:\temp\. In asp.net, you MUST use a client server type fo environment in order for you to request and get the pages, you cannot just run it in C:\temp...

hope this helps.

- tak
 
Back
Top