Solved

.aspx runs on localhost but not on real server?

Posted on 2003-11-28
6
374 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
ID: 9837072
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
ID: 9837096
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
ID: 9837441
where is your bin folder located? It can be just anywhere
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Accepted Solution

by:
MrGhost earned 500 total points
ID: 9837473
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
ID: 9837529
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
ID: 9837695
:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

23 Experts available now in Live!

Get 1:1 Help Now