Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot view any aspx page without the .aspx.cs present
Message
 
To
27/10/2003 10:11:15
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00841560
Message ID:
00845448
Views:
19
Hi Jerry,

I've been at PDC so I haven't been able to get back to you on this. It definitely sounds like you need to reinstall VS.NET. Something became corrupted on your machine that is causing VS.NET to get confused.

>Cathi,
>
>Thanks for your reply.
>
>I am getting the error message 'Could not load type projectname.classname' on all of my webforms. I get this error even if I create a new project and a 'Hello World' webform.
>
>I was able to successfully create and view .Net webforms on my PC until 2 weeks ago. However, now I cannot unless I add the src= tag to the .aspx file. I don't know what has changed on my PC if anything.
>
>The only way I can get any of my .Net webforms to work on my Dev PC is to place 'Src=myproject.aspx.cs' in the @ page directive. My projectname.dll assembly that is created in the /bin directory seems to be ignored all the time.
>
>I have even tried to create a new virtual directory on my dev pc and copy the .aspx, web.config and /bin/myproject.dll files to that new directory. But I get the same errors when trying to view the .aspx in a browser. For some reason, my .aspx won't look for my .dll.
>
>I'll try re-installing .Net if that will solve the problem.
>
>Thanks,
>
>Jerry
>
>
>
>
>>Hi Jerry,
>>
>>As far as your question about what is the difference between src= and codebehind, the 'src=' code behind requires that you have all your VB source on the production server.
>>
>>The VS.NET CodeBehind requires that you let VS.NET compile your project into a DLL, then you place the DLL on the production server. (Project - Copy Project makes this easy).
>>
>>The BasePage class can have all common functionality for all your pages. This includes handling events and exposing type-safe properties for ViewState, Cache, Application, Session, and Cookie variables. You could extend this to more layers. (EditPage inherits from BasePage)
>>
>>You can share implementation in src= code behind, but it entails creating a DLL anyway. Code Behind also allows you to 'hide' your source if you distribute your web app to others...
>>
>>Ther error message you are getting on the production server is because you are running the program on a remote machine and you have the web.config file set to not display errors to remote machines. You can change that setting or run the program on the web server itself.
>>
>>Have you tried to creating a brand new application on your machine? Does it still have problems? If so, then I would recommend reinstalling VS .NET.
>>
>>>I am using .Net 2003 on a XPPro running IIS.
>>>
>>>I am unable to view any of my ASPX webforms in a browser unless I modify the .ASPX file
>>>and replace Codebehind="employee.aspx.cs" with src="employee.aspx.cs".
>>>
>>>It looks like my bin/employee.dll file is not being used. Instead, my employee.aspx.cs file
>>>is being used.
>>>
>>>Why is my .dll file being ignored?
>>>
>>>These problems are happening on all of my ASP.Net webforms.
>>>
>>>Here's what I tried to get my webforms working. #1:)should work but doesn't #2:) works but why?
>>>Also, the following is true if I try to place my forms into production or attempt to view
>>>them in development.
>>>
>>>1:) I created a new virtual directory and placed my employee.aspx and web.config and bin/employee.dll
>>>files into the virtual directory. I then tried to view employee.aspx in a browser but get the
>>>Server Error message below.
>>>
>>>2:) I then copied my employee.aspx.CS file to the virtual directory and changed the employee.aspx
>>>line: Codebehind="employee.aspx.cs" to src="employee.aspx.cs". I then tried to view my
>>>.aspx page in a browser and now everything works! It doesn't even matter if my employee.dll file
>>>is in the virtual directory root or bin/. I can even delete my .dll file and the page still
>>>works as long as the .aspx.cs file is in the root. Also, the src="employee.aspx.cs" has to be
>>>there otherwise I get a Parser Error message.
>>>
>>>What does this mean? How can I get my Asp.net applications to work normally without the need for
>>>the src= in the .aspx file?
>>>
>>>Any ideas?
>>>
>>>Thanks,
>>>
>>>Jerry
>>>
>>>
>>>----------------------------------------------------------------------------
>>>Server Error in '/test1' Application.
>>>----------------------------------------------------------------------------
>>>
>>>Runtime Error
>>>Description: An application error occurred on the server. The current custom
>>>error settings for this application prevent the details of the application error
>>>from being viewed remotely (for security reasons). It could, however, be viewed
>>>by browsers running on the local server machine.
>>>
>>>Details: To enable the details of this specific error message to be viewable on
>>>remote machines, please create a tag within a "web.config" configuration
>>>file located in the root directory of the current web application. This
>>>tag should then have its "mode" attribute set to "Off".
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform