My hosting provider has ASP.NET 3.5 and I'm using MVC 2.0. I have two domains on my account, [URL], and [URL], each has it's own virtual directory off of the root:
/
/domainone
/domaintwo
Their routing commands for their httpd.ini rerouts [URL]to [URL] If I type in the address bar [URL], it works properly. The Problem My website links created using Html.ActionLink add the virtual directory. If you mouse over the About link in your standard MVC2.0 webapp, it displays as follows: [URL]
All of my testing and setup on my development machine doesn't have this virtual directory, and in the past my webhost didn't have this issue in the path. But since the move to their 'new' shared hosting platform, this is now what I'm having to deal with. How do I setup my ASP.NET MVC 2.0 web application to remove the unwanted virtual directory name from the path in my ActionLink controls?.....
I have a site on godaddy hosting and it is not the primary domain - that is the domain points to a folder on the server. The site works fine but I just hate that the folder name shows in the URL. I found out that ActionLink emits the vitrual folder in url. For example - www.mysecondsite.com -is on the server as a folder secondfolder under the root(www.mainsite.com), so it is like [root]/secondfolder/. But when I click a link the url displayed as http://www.mysecondsite.com/secondfolder/Home/About view source shows "/secondfolder/Home/About" rendered. How do I stop "/secondfolder/" from rendering in the output.
I have an asp.net mvc 2 app (using .net 4.0) that isn't routing correctly when hosted in a virtual directory. I have the following simple routing rule:
routes.MapRoute( "Default", // Route name "{action}", // URL with parameters new { controller = "accounts" } // Parameter defaults );
I'm trying to resolve [URL]. Where "accounts" is a virtual directory. If I put the app in the root of an IIS website it routes fine for [URL], but if I put the app in a virtual directory I get 404 errors. I've debugged and it is executing global.asax and configuring routing when in the vdir. Is there something special I need to do for routing in a virtual directory? FYI. I'm using a vdir because the root has wordpress in it. one more thing is that if I specify a default action in parameter defaults, it will execute the default action/controller, but it never matches anything else.
I have an ASP.NET web application(WebForms,Not MVC) developed in VS 2008 and i have implemented ASP.NET web forms URL routing by following this link [URL]It works pretty good when i run it on the Visual studion IDE.But does not works when i created a site under my IIS (IIS 5.1 in XP) and deployed the same files there.I have set ASP.NET version as 2.0 in the Properties window of my application too.But does not work.
I have a Domain like [URL] that is pointed to a virtual directory on my webspace like [URL]. The folder structure on my webspace is (off course) like this
root bin VirtualDirectoryName bin Content Scripts Views Web.config Global.asax
If i call now [URL] i get the Site without CSS and the links are [URL]. I used the default and almost empty default "Internet Application". So the routing is default and all links are created with @Html.ActionLink. i tried so many things but i cant get it working. In my local environment i can affect that with IIS settings but (off course) i do not have access on the IIS settings of my host.
I have an application that I run in several places (demo, production, local, etc.) that all use different virtual directories for the placement of the MVC application.
I use StructureMap in this application, so I am overriding the ControllerFactory to use StructureMap to build controllers (when the passed controller instance is not null).
My problem is that the controller instance being passed to the controller factory IS null, which is fine if said route didn't exist, but it does... specifically, it should be my DEFAULT ROOT route.
Basically if I host the app at [URL], everything works fine except when I have a '/' on the end of the URL (meaning,[URL]... the latter works fine, while the former gives me the error). It looks like when that slash is there, the routing engine is deciding that it should be looking for a controller named MvcController, which doesn't exist, and which then passes the null controller instance to the ControllerFactory, resulting in the following error:
The controller for path '/Mvc/' could not be found or it does not implement IController. My Default route is the standard default route. Removing all other routes has no effect. My default controller is HomeController.
I have an ASP.NET MVC web application running in IIS as a subweb; let's say its path is something like http://mysite.com/subweb.
I have a view which serves content obtained from a CMS. The CMS editor has entered some content containing a relative image path <img src="/images/imga.png" />.
This works fine on the production server where the site is the root website, but not on the staging server where the site is a virtual directory under the root website
The path should be <img src="/images/imga.png" /> on the production server
and <img src="/subweb/images/imga.png" /> on the staging server.
Is it possible to use the <base> tag to resolve this image path?
It doesn't seem to work. Can anyone explain why or if this is a workable approach? I don't want to require the content editor to have knowledge of the website deployment option (which changes between UAT and production).
I have a WCF service in a virtual directory that is called in the code behind of a page that is in the parent directory, when i debug the code i can see the wcf service is being called, however when the service calls Membership.GetUser() it alway returns null. The user has already logged in to the asp.net site. When i call the service via jquery it does pick up the correct user, but i need to be able to call it via the code behind as well. I am developing in .Net 3.5 how i can make the Wcf pick up the logged in user?
I made a web form on a development website of mine (we'll call it dev.somewhere.com) and tried to publish it out to the web (we'll call it [URL]) in a subfolder. I named it default.aspx like I was supposed to and it worked flawlessly on the dev site. When I published it out the web, I wound up getting the following error when trying to get to the subfolder: [URL] Directory Listing Denied
This Virtual Directory does not allow contents to be listed. Confused and flustered, I tried to go to [URL], but I wound up with some error that won't tell me the problem. Instead it tells me to change the my web.config to read <customErrors mode="Off"/>.
As virutal directory points to physical path of the application, so if the IIS root directory is C:inetpubwwwroot and the application is stored at D:websites, than we need to create a virtual directory but if the application content is placed at C:inetpubwwwroot, then why still need to create virtual directory.
I set up a Virtual Directory called 'Site'. I browse to [URL].In the source file, the relative paths are coded as '/Page1.aspx', for example, and it has worked in the past.I'm using Win XP Pro SP3 and IIS 5.1. Any ideas on what might be causing this behavior?
Error 1 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. C:PdfViewerPdfTestSiteWeb.Config 28
*********************************** When I double click the error it goes to Web.Config file to tag:
My basic question is, can a virtual directory in IIS point to a physical path that's not on the local machine? For instance, right now I have a virtual path /NaturalGasReport/NYMEX which points to physical path C:Program Files (x86)NymexSettleNATGAS_REPORTNYMEX, but I want it to point to a physical path on a difference PC on the same network. Is this possible? (I know I can just try it out so I apologize for asking but I thought it would be best to get an explanation along with "yes" or "no"). If you want more detail, this is what I need to do. To make a long story short, because of a vendor product we are using that won't run on a 64-bit operating system, I have to run a program called Generate_NGReportData.vbs (it's a vbscript program) on a PC I will call 28. It uses a vendor product which produces jpg files which are graphs of the Natural Gas market. The machine where I wish it could run is called RTEST01 but this machine runs a 64-bit OS and the components won't work there. RTEST01 has the databases. So, I created a datasource on 28 which points to RTEST01's database. The vbs program will read the data, generate the reports, and write one row to a database table on RTEST01. RTEST01 has to run the complimentary program which sends these reports (via email). 28 is not an email server so it can't email the reports. So on RTEST01 I will run Send_NaturalGasReport.vbs. This program creates an email body of html. The html references [URL]NaturalGasReport/NYMEX/" & Day(nymex_update_dt) & ".jpg which is a virtual directory pointing to C:Program Files (x86)NymexSettleNATGAS_REPORTNYMEX. I need it to point to the folder and files on 28.So if my initial question has a simple yes answer then I am all set. If not, examine my architecture and propose an alternative solution.
First of all, I am trying to deploy a web application, without virtual directory. Yes...I have no other option but to try this due to some non-tehnical constraints.
Now, I have developed an ASP.NET 3.5 Web application, which works fine on my local ASP.NET Development Web Server. Then, I published the application to the actual webserver using the VS2008 Publish... option. When I got some error messages related to web.config, I removed the corresponding items from the web.config.
When I can access the page but the code inside the page doesn't really work. When I open the Default.aspx, which is directly under the website, I keep on getting this error:
Compiler Error Message: CS0246: The type or namespace name 'DynamicLoadControl' could not be found (are you missing a using directive or an assembly reference?)
This DynamicLoadControl is a class that I have developed and is present in App_CodeDynamicLoadControl.cs file (in the same namespace).
I have searched a lot and tried everything except creating a virtual directory. First of all, is it possible to have asp.net 3.5 website without virtual directory.
m new to .net framework 4 and iis 7.I created a webapplication in VS2010 with C#.I created the virtual directory for that web application in my IIS (IIS 7).when i tried to open the page by using virtual directory, it is displaying the following problem.Server Error in '/' Application.
Configuration Error Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.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.Source Error:
[Code]....
Source File: E: estweb.config Line: 12 Show Additional Configuration Errors:
Assuming here that I have full control over the server.I'm looking for a sample code that would help me understand how to create a new virtual directory on the IIS pointing to say C:
I'm new to IIS, I just want to create a virtual directory in IIS. I'm using WINDOWS7.When I Browse my Default file it throws the folling Error,Error SummaryHTTP Error 500.19 - Internal Server ErrorThe requested page cannot be accessed because the related configuration data for the page is invalid.