0

I have a hosting account where I cannot login to the server, I must use an admin panel and FTP to deploy a project.

I have an ASP.NET 2.0 webforms Web Application that I need to deploy to a deep folder, but don't believe I have access to create a virtual directory on this folder.

I can deploy this code/app properly on my own server by going in and creating a virtual directory. Then the app runs fine. Without the virtual directory, I get the same error on the production environment I'm trying to deploy to.

They are all parser errors, like

The file '/Site.master' does not exist.

and

Could not create type 'myNamespace.webServiceName'.

Do I need to build it differently? Publish it differently? Should it be a website instead of a Web Applications? I am several folders deep on a web server that definitely has .NET and definitely works with other apps.

1
  • 1
    Is the site pre-compiled or not? Normally in a hosting environment such as the one you describe, you'd just upload all your files & folders to the wwwroot folder via FTP. Commented Nov 2, 2011 at 23:06

4 Answers 4

1

Basically you change the host. Point.

Any host offering ASP.NET should also offer the creation of applications, which are a special form of virtual directory. Call their support. If they are not helpful, run. Breach of contract.

Sign up to request clarification or add additional context in comments.

Comments

0

Usually your hosting provider will have a way to convert the Virtual Directory to an Application through some sort of admin panel. If not you can try calling and have them do it for you.

Comments

0

I've had to deal with this in the past with some hosting providers. Essentially, they give you a single Virtual Directory, which contains a single active "bin" folder for your dlls. The trouble is that all of your paths are completely different when you build a Web application at the root of a project in Visual Studio.

One way that we got around the issue is to reconstruct the exact same folder structure starting from the root of the Virtual Directory on the Production server within your Visual Studio project. It's a bit more cumbersome to manage the project (and proper namespaces, if you're a purist in that regard), but then you can put the compiled dll in the "/bin" folder and publish the rest of the files directly into the correct folders. By doing this, your project will know the full path to the files as they will exist on the Production server, so doing things like Server.MapPath() will product the correct results.

Another option would be to find a different hosting provider (suggested by TomTom), but that might not be feasible depending on your situation.

Comments

0

I found a way to make the Virtual Directory in my shared host (1&1). This was a deeply hidden feature in a web-based file browser, where I didn't expect it.

Ultimately I wasn't able to deploy this without creating a virtual directory, so luckily they DID in fact have this feature.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.