473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help interpreting error?

I have an ASP.NET 2.0 web application that runs fine on my local
machine. However, once I upload it, I get this error:

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: The file '/index.ascx.cs' does not exist.

Source Error:

Line 1: <%@ Control Language="c#" Inherits="mysit e.IndexContent"
CodeFile="index .ascx.cs" %>

Source File: /index.ascx Line: 1

The DLL is in the remote server's bin folder. All of the ASPX and ASCX
files are there as well. Any ideas?

Thanks,
Brett

Oct 21 '06 #1
14 2048
Hi,

brett wrote:
I have an ASP.NET 2.0 web application that runs fine on my local
machine. However, once I upload it, I get this error:

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: The file '/index.ascx.cs' does not exist.

Source Error:

Line 1: <%@ Control Language="c#" Inherits="mysit e.IndexContent"
CodeFile="index .ascx.cs" %>

Source File: /index.ascx Line: 1

The DLL is in the remote server's bin folder. All of the ASPX and ASCX
files are there as well. Any ideas?

Thanks,
Brett
You are mixing two models. On one hand, you can publish CS files to your
server, and the classes will be compiled on demand. On the other hand,
you can publish one or more DLL.

In the first case, you refer to the CS file using the CodeFile attribute.

However, in the second case, you must refer to the file without the
"CodeFile" attribute, but using the "Inherits" attribute only. In that
case, the assembly gets looked for in the "bin" directory. You can also
specifiy the assembly name if you know it, using this syntax:

inherits="Contr olName, AssemblyName"

Normally, when you use the "web site" model and "publish" it, the
references in the ASCX and ASPX files are automatically updated to the
second way.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 21 '06 #2
Thanks. That fixed the first problem. But when I upload contents from
the local Published folder, I get this:

I found out the problem was that I wasn't published the site. I've
created a local published folder and published there. Then I uploaded
to the remote server. Now I get this error:

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 'mysite.Global' .
Source Error:
Line 1: <%@ Application Inherits="mysit e.Global" Language="C#" %>
Source File: /global.asax Line: 1

I then created a virtual directory on the local Published folder. When
I access it via http, I get this:

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: The file '/Published/index.ascx.cs' does not
exist.
Source Error:
Line 1: <%@ Control Language="c#" Inherits="mysit e.IndexContent"
CodeFile="index .ascx.cs" %>
Source File: /Published/index.ascx Line: 1
Should it not be looking for CS files after being published?

Thanks,
Brett

Oct 21 '06 #3
I followed your suggestion and changed the aspx files to use
inherits="Contr olName, AssemblyName". Apparently the publishing
doesn't change it.

I still have the issue with the Global.asax file.

Thanks,
Brett

Oct 21 '06 #4

brett wrote:
I followed your suggestion and changed the aspx files to use
inherits="Contr olName, AssemblyName". Apparently the publishing
doesn't change it.

I still have the issue with the Global.asax file.
Drat! I never could get the Global.asax file to open in the VS.NET
editor. I opened it in Notepad and changed the top line to use

inherits="Contr olName, AssemblyName"

That fixed it. Everything seems fine. Do you know why the Publishing
didn't change the inherits part?

Thanks,
Brett

Oct 21 '06 #5
Hi,

brett wrote:
Thanks. That fixed the first problem. But when I upload contents from
the local Published folder, I get this:

I found out the problem was that I wasn't published the site. I've
created a local published folder and published there. Then I uploaded
to the remote server.
How do you compile / publish your website? Do you use the web
application project?

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 21 '06 #6
Hi,

brett wrote:
brett wrote:
>I followed your suggestion and changed the aspx files to use
inherits="Cont rolName, AssemblyName". Apparently the publishing
doesn't change it.

I still have the issue with the Global.asax file.

Drat! I never could get the Global.asax file to open in the VS.NET
editor. I opened it in Notepad and changed the top line to use

inherits="Contr olName, AssemblyName"

That fixed it. Everything seems fine. Do you know why the Publishing
didn't change the inherits part?

Thanks,
Brett
No, I don't. Try to create a small website and to publish it to test.

Also, the "publish" option changes it if you choose the "new website"
option only. If you use thw web application project, it doesn't. Are you
mixing both concepts?

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 21 '06 #7
I have an ASP.NET application project. I right click on the project
and choose Publish. I have chosen the "Target location" as the local
file system and http but that didn't matter for my issue. I have these
options selected:

- Replace matching files with local copies
- Only files needed to run this application

I then click Publish. It publishes into a sub folder of my current
project. That sub folder is a virtual directory so I can test it via
http. I then FTP the contents of the sub folder onto my remote server.

Does that help?

Thanks,
Brett

Oct 21 '06 #8
Hi,

brett wrote:
I have an ASP.NET application project. I right click on the project
and choose Publish. I have chosen the "Target location" as the local
file system and http but that didn't matter for my issue. I have these
options selected:
If you mean the web application project (WAP) described here
http://webproject.scottgu.com/
then I think you have a problem, or maybe you made a mistake when you
created the control.

When you add a User Control in the WAP, the Control directive on top of
the page doesn't carry the CodeFile attribute. Could it be that

- You added that attribute yourself
- You included an existing ASCX file from another project in the current one
- You converted an ASP.NET 2 website to the WAP?

That would explain why the CodeFile attribute is found. That also
explains why the attribute remains when you publish it, because in the
WAP, the ASCX and ASPX files are left as is.

If you leave the CodeFile attribute in the directive, but the file
doesn't exist, you can compile the code, but you will have a runtime
error when the page is loaded the first time.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 21 '06 #9
When I created the project, I selected ASP.NET Web Application. I
don't think this is a WAP. I did add some of the ASCX controls from a
1.1 Framework project. But then I also added ASCX controls new into
this 2.0 project. For both, the CodeFile attribute was there. Guess
I'll just need to make sure I always change that.

I do have an option to convert this project to a Web Application.

Thanks,
Brett

Oct 22 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
310
by: deancoo | last post by:
Hello all, I'm new to the C++ STL, and am trying to wrap my head around why the following piece of code doesn't compile. What am I doing wrong? Thanks for any help. d #include <cstdlib> #include <iostream>
22
1866
by: Rich | last post by:
I am trying to create a site that will re-direct a user based on their OS. For this site I will need to send NT4 and 95 users to site A and 2000/XP users to site B. All others should be directed to site B. Thanks in advance. Rich
0
1647
by: Nick Leeson | last post by:
Hi, I am using the DDD front-end to debug a program I wrote in C. I got the following error message... --------------------------------------------------------------- Program received signal SIGSEGV, Segmentation fault. 0x42010037 in _r_debug () from /lib/tls/libc.so.6 (gdb) --------------------------------------------------------------- Is the bug in my program or somewhere else i.e /lib/tls/blahblah as
0
900
by: Jeff Friedman | last post by:
Hi all, I have a C# app which is executing simple WMI queries to multiple machines. Some are Win2000, and some are Win2003. I am suddenly running into a problem connecting to WMI on some of the remote machines. The following exception is thrown: "No security packages are installed on this machine or the user is not logged on or there are no compatible security packages between the client and server." The code has not changed, and...
7
2492
by: Vinay | last post by:
Hi, I am using Excel in my VB.Net project. While deploying my application on a separate machine, I am getting the following error: File or Assembly name Interop.Excel or one of its dependencies was not found. I do find Interop.Excel.dll is existing on the target
2
1660
by: brynk | last post by:
Anyone please help... I'm a newbie on creating functions in postgresql. Here is an oracle package that I'm trying to port to postgresql: CREATE OR REPLACE PACKAGE BODY NewsPkg.NewsTools AS PROCEDURE del_news (i_id IN VARCHAR2) IS
43
2220
by: ZillionDollarSadist | last post by:
Hello, I'm working at a simple Access '97 + VB4 application, and I ran into a terrible problem: something I never modified now gives me a totally unwanted "Invalid use of null" error. It happens in a Text.LostFocus event, this block: Do While Not TB6.EOF If Year(TB6(0)) = Val(Trim(Text1.Text)) Then !!!!!!!!!!!!!Here!!!!!!!!! ...
6
1904
by: drec | last post by:
I am just learning Javascript and I would like to create a basic form that gives me two options. This will be using either checkbox or radio input type, however I would like the second option to allow the user to type in a value. Also, I would like the 2nd option only editable if the button for that option is selected. All I can seem to find is basic examples of forms, and none of which have this feature. The form would look something...
2
2065
by: billsahiker | last post by:
I wrote a test program to help understand asynchronous calls in c#. I have a working VB.NET app that uses a similar technique but I cannot get it to work in c#. The errors I get and the code below. I understand the need for threading when updating UI and the general concept of what is going on but do not understand the two errors.: Error 1 'testwinform.Form1.WorkDoneDelegate()' must declare a body because it is not marked abstract or...
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7352
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.