Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extra folder appended to my web root on AWS

I'm running into a problem all of a sudden. I recently re-deployed my .net application on AWS elastic beasnstalk instance and now have an extra segment appended to my web root.

Now my URL structure looks like this:

http://domain.com/Project Name.Web_deploy/default.aspx

I have not made any changes to either my project or AWS configuration. What could be causing this?

When I logged in to RDP instance, I found one web.config on IIS root with some rules where I found project_name.Web_deply.

I am not using any FTP or AWS console to update my recent code instead I am using AWS explorer for Visual Studio 2010 which internally using git.

I am using windows server 2012 with sql server 2008 on server.

like image 991
Naman Goyal Avatar asked Sep 10 '13 12:09

Naman Goyal


2 Answers

It seems that in the latest updates to Visual Studio 2012 and 2010, VS removed those configuration options from the project properties page (IIS Web Site/application name to use on the destination server). Instead you can directly specify the website/application name by editing the .csproj file. You can add the to the appropriate element.

If you want it to apply to all Configurations and Platforms and deploy at the root, you can include it in the element, i.e.

<PropertyGroup>
        .....
        <DeployIisAppPath>Default Web Site/</DeployIisAppPath>
</PropertyGroup>

Or for Release|AnyCPU build target and your own virtual directory:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DeployIisAppPath>Default Web Site/MyVirtualDirectory</DeployIisAppPath>
</PropertyGroup>

Hope this will work

like image 141
Tarun Mathur Avatar answered Nov 03 '22 15:11

Tarun Mathur


When applications are deployed to virtual directories, the Elastic Beanstalk on-instance tools will create a web.config at the root level which uses URL rewrite rules to redirect requests for the root to the virtual directory.

In Visual Studio 2010, you can open the project properties, choose the Package/Publish Web tab, then find the field on that tab labeled IIS Web Site/application name to use on the destination server.

By default, the value will be a virtual directory like Default Web Site/MyApplication_deploy. If you want to deploy your application to the root, change this to Default Web Site/ and redeploy.

like image 32
Jim Flanagan Avatar answered Nov 03 '22 14:11

Jim Flanagan