Solved

.aspx runs on localhost but not on real server?

Posted on 2003-11-28
6
371 Views
Last Modified: 2010-04-16
hi all,
following problem:
I work with VisualStudio.NET. I have some code here (several *.aspx + *.aspx.cs files) which works perfect ;) on localhost.
But if I copy the files to a different directory on localhost it does not work any more.

" Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

Ok, so I deleted "Web.config", then I get the following error:
" Parser Error Message: Could not load type 'test1.multiLanguageEditVariable'."
in line:
"<%@ Page language="c#" Codebehind="multiLanguageEditVariable.aspx.cs" AutoEventWireup="false" Inherits="test1.multiLanguageEditVariable" %>"

But both files files exist (apsx and aspx.cs) and a apsx.resx ios beeing generated.

The problem:
I can only upload (FTP) files to the real server, I can't configure folders to become an application.

What can I do to get my files working online?

Thank you, regards
0
Comment
Question by:Smoerble
  • 4
  • 2
6 Comments
 
LVL 4

Expert Comment

by:MrGhost
Comment Utility
Go to the IIS and check your folder (Properties) if under application name CREATE button is enabled then click it!
If not check the path!
0
 

Author Comment

by:Smoerble
Comment Utility
As I said:
I cannot do anything like this on the server, I only have FTP access.
I already have some working *.aspx scripts there, but I created them without VisualStudio.
0
 
LVL 4

Expert Comment

by:MrGhost
Comment Utility
where is your bin folder located? It can be just anywhere
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Accepted Solution

by:
MrGhost earned 500 total points
Comment Utility
Or maybe you just need to rebuild your app after you deleted web.config

or maybe this will help(copy/paste):

These errors can be frustrating.  Usually "Could not load type" exceptions
result from the DDL not being found, incorrect file permissions on the DLL,
or version mismatch between the assembly that needs to be loaded and the
one that was discovered.  

Is the bin directory you are using c:\inetpub\wwwroot\dotnetforms\bin?  If
so, then it wouldn't hurt to go into the MMC and verify that there is a web
application that corresponds to c:\inetpub\wwwroot\dotnetforms.  Only the
<WebAppRoot>\bin directory and the Global Assembly Cache (GAC) are searched
for assemblies.

Next, check the file permissions on the DLL to ensure that read and execute
rights have been granted to the user the request will be executing as.  An
easy way to verify that this is not permissions-related is to grant
everyone full control, OR disable anonymous authentication and authenticate
as an administrator.

Next, if the DLL is there and the permissions look correct, check for a
version mismatch.  You can see the version number of the assembly that is
trying to be loaded in the error (1.0.785.42706).  To determine the version
of the assembly in the bin directory, you can use ildasm.exe or just view
Properties->Version of the file in Windows Explorer.  These versions should
match.  You can also use ildasm to verify the name of the assembly.


If you still are getting an error after these steps, please let me know
what you found and we can go from there.  You might also want to check out
the information below:

How the Runtime Locates Assemblies
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconhowruntimelocatesa
ssemblies.asp

Assembly Binding Log Viewer (Fuslogvw.exe)
http://msdn.microsoft.com/library/en-us/cptools/html/cpgrffusionlogviewerfus
0
 

Author Comment

by:Smoerble
Comment Utility
thx for the copy paste, that helped.
the dll was in test2/bin, not in wwwroot/bin ;)

Points granted for the copyPaster ;)
0
 
LVL 4

Expert Comment

by:MrGhost
Comment Utility
:)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now