Configuration :: How To Change The Subfolder Attributes
Mar 20, 2010
Using VS 2010, RC, VB, how do I change the subfolder attributes. When I publish and choose to delete all the files and folders, I have to recreate the security levels for them manually. I assume that I can have Web Config do that for me.
I've been working on site for a client who has just informed me (having completed the work) they want to deploy the site into a subfolder of their exiting domain. The site uses a number of class files in the App_code folder and as well as references to several XML files and and siteMap that uses localised urls for navigation. Obviously all of this stops working as soon as you put it in a sub folder. Is there any way I can configure the site to treat the sub folder it will be placed in as the root?
I currently have a dedicated server running a number of sites, one of these sites I would like to add a subfolder to which runs a seperate index.html file, so effectively it looks like a different site.
I am struggling to acheive this, can anybody give me the steps involved to make this happen?
To clarify, i have a web address for example www.mydomain.com and would like users to browse to www.mydomain.com/subfolder and open up a sub folder.
So my website works great on my local computer. It also works fine when I use the Copy Web Site feature in Visual Web Developer 2010 Express. But I do not want all of my files and the default.aspx to be sitting at the root of my domain name. I want it to be in a subfolder.
So again, it works fine when it's sitting at www.domainname.com
But when I use my FTP program to move the files to:
www.domainname.com/subfolder/
I get an error when I try to visit the site. It's just a general runtime error and does not display the specific error message. It obviously must have something to do with when I MOVE the files/folders from the root of the domain to the subfolder?
I have a web site running on IIS7 on a remote server. I would like to do the following: Create a new subfolder under the root virtual directory. Create a new app pool. Add this new app pool to the new subfolder Normally, I would do this manually in IIS by first creating the app pool, and then right-clicking the sub folder an choose "add application", but I need to do this programmatically in C#. I've managed to make the above points 1 and 2 work, but I can't find the way to adding the application to the sub folder. This is the code I have used so far for 1 and 2:
[Code]....
So, I need to add "MyAppPool" to the "NytSite" folder. Is this even the correct way to do this?
I have a menu in a user control with a sql database datasource. From what I have read online, the staticselectedstyle will only work if the menu control has a datasourceid defined. Here's what I have so far:
I want to change the font size of my gridview in javascript because i am creating a printable version. How can I change the font size in javascript for the gridview?
Using VS 2010 RC, VB, I have a label on a masterpage that is hidden. I want to make it visible from a content page when needed, and have the text change on the label as well from the master page.
I am using the following to access the label, but the text and other properties don't change for some reason.
Dim lblErrorMessage As Label lblErrorMessage = CType(Master.FindControl("lblErrorMessage1"), Label) lblErrorMessage.Style.Add("display", "inline") lblErrorMessage.Text = "LoginID ALREADY EXISTS!!! Please choose a different ID"
I would like to change the link that has been clicked, to class="active". I would like to add a class to the div if the page above is clicked too.
If (Len(Request.QueryString("pageid")) <> 0 and Request.QueryString("pageid") = 4) Then menu & Request.QueryString("pageid") & .Attributes.Add("class", "active") link & Request.QueryString("pageid") & .Attributes.Add("class", "activelink") end if
I have a gridview, and I want to change the backcolor of any row that has the column checkedin = false.
I have this working fine, except that it will not change the backcolor of the first row and only the first row. Matter a fact if I sort the columns by clicking on the header rows the order changes and the backcolor highlights the row that was the first row before it was sorted so long as it is not the first row. I actually removed all formatting from my gridview and still the same issue.
I am accessing this xml file by using LINQ to XML in asp.net by using C#. I am able to access all the attributes of an XML node by explicitly specifying the name of the attribute. I want to write query on this xml file which reads all the attribute values of the xml node (In our example the node is SERVER) dynamically means I want to write the query which can read the read the value of the attribute Name & ID from first node, only name from second row, Name, ID & Parent from the third row , Name & ID from the fourth row, Name, Parent & Value from the fifth row & only Name from the sixth row without modifying the existing code every time. Once I add one of the attribute ( for example if I add the attribute ID in the sixth row ) in the above xml file then I dont need to modify my LINQ to XML query. My query should dynamically fetch the total number of attributes & display their values. Is their any way to do this ?
I'm using a BlogEngine.net for my blog and I would like to create 5 different subdomains and point to different subfolders(not redirecting). For example:
I've got a folder in my project on a live webserver, called "admin" with a file in it called "default.aspx". Now, I cannot access this folder like this: [URL] however, if I put a slash at the end, it works fine: [URL] or, this works fine, too: [URL]
I'm trying to run a little ASP.NET project in a subfolder of my hosting. My domain is [URL], but i want to run my app in www.gorangligorin.com/testmvc. ASP.NET MVC runs with no problems on the top level, but not in subfolders.
The server says this (line 58 is colored red):
Line 56: ASP.NET to identify an incoming user. Line 57: --> Line 58: <authentication mode="Forms"> Line 59: <forms loginUrl="~/Account/LogOn" timeout="2880" /> Line 60: </authentication>
What can I do to make this ASP.NET MVC website work? This isn't hosted on my computer, so I don't have access to IIS configirations.
My site structure is like that I've 4 sub folders and few pages at roots when sub folder pages are viewed in browser their css breaks some of the images doesn't work well.
I have a web application with root namespace called mywebapp The web application has as folder under root. Call it folder1. Now this folder contains a default.aspx page with code behind vb file class file. Call it subdomain1. Now when the default.aspx page under folder1 is requested, following error is shown Parser Error Message: Could not load type mywebapp.subdomain1. There is no problem what so ever when I run it localhost. Error is only thrown when the page is requested online. I also made some changes in a page in root folder to verify if the mywebapp.dll is correctly copied to the webserver. All the changes done for root folder are correctly reflected online
In my project I have a website that has 2 sides, the client side and the management side. Everything is completed and works fine.
My idea was to place the management files in a separate folder (mysite.com/admin) the problem is that when I moved the files it could not compile because my admin pages inherit from a class in the app_ folder and looks like it cannot access it.
I wanted to compile the files in the app folder into a DLL but when I try, it gives me a error in the namespace System.Web.UI.Security and the WebControls ns...
How can I access my classes if my files reside in a subfolder within the same application. If I take the files out of the subfolder everything works fine
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.
Basically no unauthorized users should be able to use the system, so they get properly redirected to Home.aspx which has the login controls.
The Administration folder contains a page that should be only accessible to authorized users, but also only to users that belong to specific roles. So I have a web.config inside the Administration folder as this:
[Code]....
At first sight I'd say that this configuration would check that only SystemAdministrators and AccountManagers can access the SecuredPage.aspx. But it doesn't. If I log into the system as a regular user (not part of the roles) and then go to http://mysite/Administration/SecuredPage.aspx, it allows me in, instead of showing a "your not authorized" message.
I've also tried with location=Administration so to secure the entire folder, but same results.
He has a project set up with the master page and the default.aspx at the root level of the project.He then has several layers of subfolders.On subfolder is DynamicData, and under that PageTemplates and he has a file in there called ListDetails.aspx the uses the same master page on the root. If he sets the ListDetails.aspx as the start page, it says resource can't be found when he runs it.if he sets a redirect to it as:
Response.Redirect("~DynamicDataPageTemplatesListDetails.aspx"), it also says resource can't be found.
My restricted files are all stored in ~/Secured folder on the root. Authorized users have no trouble accessing aspx files in that folder. Recently I added a part of an application whose files I wanted to keep separate and created a ~/Secured/HR folder. I am getting a "resource not found" error trying to use any aspx file in HR folder even after user successfully logs in, as if the file does not exist at all. Here is my web.config security settings:
[Code]....
Do I need to configure security for that folder separately?