views:

307

answers:

3

It has been two days and I haven't been able to make this application work in the hosting computer. This application is in a subdirectory and is written in C# the other application is C#. It work just fine down here in my development computer. I have been trying the following.

  1. 1.I made the changes to the web.config so it doesn't conflict. (seems to be fine)
  2. When I created the application was created with Version 3.5. I downgrade to 2.0
  3. I have been recompiling, being sure that the .aspx file and the .cs file it's under the directory. Waht Am I missing.

Any ADVISE/Comments or questions please let me know. This is frustrating. Below is the link and the error I get

http://www.martinesexpress-inc.com/PhoneControl/Default.aspx

Server Error in '/' Application. 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 'ElLogPh._Default'.

Source Error:

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ElLogPh._Default" %>
Line 2:
Line 3: Source File: /PhoneControl/Default.aspx Line: 1 Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

A: 

I don't know if this will help, but are you building in Release mode?

Jeramy Rutley
Yes I am building in releasing mode
+2  A: 

Basically, in a nutshell, the dll that is compiled for you (and comtains the class 'ElLogPh._Default') is not being found. There are a few reasons for this to be the case, but here is the first that comes to mind, and the most likely:

The first question is, are you aware of how a Visual Studio web site project corresponds with an IIS application? This is incomplete, but the simplest description of the first thought that comes o mind.

When you create a web site project in Visual Studio and Build it (or publish it, since VS's publish process includes building it first) all of the code behind is compiled into dll's that are put in to the "bin" directory.

When you publish this out to the web site, an IIS application has one and only one bin directory. Any bin directories in nested folders are not treated as actual bin directories.

So, if you built this as a different project and just copied it into the original folder, your structure would look like this:

\Parent

\Parent\Bin

\Parent\YourNewApp\

\Parent\YourNewApp\Bin

I'm thinking that the ElLogPh._Default class is in a dll inside of \Parent\YourNewApp\Bin.

The resolution to this would be to go to the IIS manager and make \Parent\YourNewApp an application.

If it sounds like I'm on the right path, instructions for creating an application in IIS are found here: http://www.affiliatewiz.com/support/appstartpoint.asp

David Stratton
Makes sense, let me try that and I'll get back to you
Is Virtual Directory the same thing than "Creating Application" in IIS. That's the option that I have in my hosting company
Not exactly, but when you create a virtual directory as described at http://msdn.microsoft.com/en-us/library/zwk103ab.aspx, an application is created for that virtual directory automatically.
David Stratton
Hey guys after many trial I made ir work. It seems that I need it to put the virtual directory in the application. Also the explanation above help me disect the problem. THANKS A BUNCH
*trials correction correction
+2  A: 

You're publishing to a sub directory (PhoneControl) of the application root (http://www.martinesexpress-inc.com/). If PhoneControl is not an application in IIS, then it will won't look for assemblies in http://www.martinesexpress-inc.com/PhoneControl/bin but http://www.martinesexpress-inc.com/bin.

jrummell
+1. Essentially what I said, but in fewer words. Good answer.
David Stratton