C# - Can Use Reflection To Find The Bin Configuration Folder Instead Of The Temporary Folder
Mar 11, 2010
I have an ASP.NET website and I want to find the /bin/[Configuration] folder to use an external tool (an exe file). When I use reflection to get calling assemblies location it returns something similar to:
C:WindowsMicrosoft.NETFramework\...Temporary ASP.NET Filesa1388a5e\...my.dll
Since each dll has its own directory under the temp ASP.NET Files this fails for me. How can I get the location of the compiled binary folder where the dll's and the .exe is (i.e. bin/) instead of asp.net's temporary cache?
We store backup archives in subfolders of a folder on one of the server's external USB drive. I would like to have an ASP.NET app read the contents of this folder so the manager can view the backup files to confirm backups are working and optionally delete these backup files when an old drive is reconnected so it can be used for the next weeks backups.
This backup folder is oubviously outside the server's webroot. Is there some way I can grant authority so the ASP.Net app can access this folder for this purpose? I would be using VS Web Express, so can't create any signed packages and such.
I know this is a bit like how long is a piece of string question, but I'm wondering how big some peoples ASP.NET Temporary Files folder, gets. I wish to move this folder to a RAM DISK so I'm trying to see how big this should be set, to.
so I accidentally deleted the "Temporary ASP.NET files" folder instead of just purging its contents. Looking at the same folder on a different machine there's really a lot of detail in the security setup.
Is there a simple way to restore the this folder with its full suite of permissions, the way ASP.NET intended?
In above link you clearly describe (How to display directory folder structure).
The path only works when the folder insight the project.
When I put folder outside the project it didn't work. What type of changes I need to made to acces the folder outside the poject. & How can I show other details of files which are including in folders Like. Last Modified Created Date, Modified Date etc..
I am working on asp.net 3.5 in C#. In my application I have to Create folder and upload file in that folder, which works fine on my machine. I want help for create folder and upload file in that folder on other machine which is connected in LAN. code for create folder and Upload file on my machine
Im trying out the Hudson Continuous Integration. After the build is executed i want to copy the content of the ReleaseBuild to another website on the server.This should be possible i guess but i cant seem figure it out.I know this can be done in nAnt and msbuild but i need to make Hudson do it, eg plugin or something.
I have a simple photo album. I have some catories in db and corresponding folders. For example, when user creates a category called "Asp Net" in db then a folder called "AspNet" is created. Then user can upload photo and all photos are displayed as thumbnail. No photo is saved in db, they are directly saved lets say AspNet folder. I just fetch filelist from intended folder and list them. However I want user to be able to update category name or delete it. To keep consistency, corresponding folder should be updated or deleted. But when I try it throws exception: Access to the path 'xxxxx" is denied.
I want to create a folder to store some web controls, so the site structure doesn't have a zillion files in the root.
Except that if I create an ordinary folder, that folder is also visible on the web site. MSDN said you cannot put it in App_Code, and it doesn't really make sense to put it in other special folder like App_Data or App_Theme.
I have a class file stored in the app code folder. A certain page that I want to access is inside its own folder within the root and it is using the namespace within the class file in the app code folder. How do I tell the application where the file is? I'm sure I could put the code in a file inside my folder, but I'd rather not have duplicate code in two different files... unless there is a way to make a reference of some type.
I have a folder with png images that are not shared or public (the folder is outside my application folder). Now I want my users to be able to view thoose images only if they are logged in (different users, different images). All images have a name that correspond to the users id. My idea is to stream thoose images into the asp:Image control, is that possible? How do I do that? Other (better) solutions?
I am new to asp.net and was just developing simple gmail login page. I have created a folder name Images in App_Data. I put Gmail image in App_DataImages. I have written the following code in source file to display my image on Webpage.
However, when I have reached to ImageURL = "....it has shown me Pick URL and when I brwosed to App_DataImages folder, I could not find my Gmail Image that I have saved before.
We developed a dll that we reference and use in different web sites. Right now this dll is in the bin folder of each web and when we update the dll we have to copy the new version of the dll in all and each webs' bin folder.
I wonder if these webs can reference to a dll that it is not in the bin folder so to have the dll phisically in only one place (let's imagine c:inetpubinmy.dll), much easier to mantain and update.
I have a weird problem. In my web site project, i am using a lot of third party dll's and i dont want to install them in GAC. So, I had placed all those dll's in Bin folder of application root. When i run the application, it is saying that reference is either incorrect or dll file is missing.
i am running the application from clearcase. I have full execute permissions in that folder in clearcase.
In the solution explorer, when i right click on my project and go to "property pages", it is only showing dll's from GAC only. None of the dll's I had kept in bin folder are being displayed.
When I attempt to test my new report on my workstation in Visual Studio 2010 running the beta Crystal Reports for 2010 it can not find the folder containing the required files.
Is there a way to force it to find them so I can debug the code calling the report?
how to move a file from a folder to another folder in asp.net? I have the filename as a string and the directory to copy to there is a saveas command but i cant use it with a string.
How can I add a sub folder within the Views folder for a controller?
I have a controller named "admin". In the Views folder, there is an "admin" folder.
The admin controller has a number of actions. For each group of actions, there is a partial class that contains the actions of the group. admin/reports, admin/inventory, admin/orders, ... Problem is, when I move the "ReportsIndex.aspx" view into folder Views/Admin/Reports, MVC says it cant find the view when the ReportsIndex action method does a "return View("ReportsIndex", model) ;".
I have deployed my website in ftp server.now i need to upload image to my database and place images in upload folder. while uploading images i'm getting the below error.
Access to the path 'd:hostingmystieproductImagesvaara.jpg' is denied.
Description:
An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.UnauthorizedAccessException: Access to the path 'd:hostingmysiteproductImagesvaara.jpg' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.