server.mappath Questions

9

Solved

What I must do to make Server.MapPath work? I have using System.Web; what else? When I type Server there is no quick result option (intelli-sense) for Server. Any help?
Guidon asked 19/6, 2012 at 16:59

2

Solved

I need to make a file list in a list, which used to be easy.. but not on Asp.Net Core 2 Razor pages. I cannot find a way to get the physical path of "Poems" which is inside "wwwroot". I found many ...
Hadlee asked 11/1, 2018 at 10:3

4

Solved

My business layer creates files and needs to save them in the App_Data folder of my asp.net mvc 4 web frontend. I could use Server.MapPath in the business layer to get the physical path of the App...
Coatee asked 6/9, 2012 at 6:51

7

Solved

I have deployed my project to Azure. In my project I have "App_Data\Images" folder. Now I'm trying to do the following: String filename = GLOBAL_IMAGES_VALS.GET_FILE_PREFIX(imageType) + "-" + Use...
Haemic asked 18/11, 2015 at 14:5

7

Solved

How can i use the server.mappath method in a C# class library class ,which acts as my BusinessLayer for My ASP.NET WEbsite
Jacktar asked 29/7, 2009 at 11:11

2

Solved

I have following code: var dir = @"Content\Posts\" + yr + @"\" + mnth + @"\"; var a = Path.Combine(dir, dy.ToString() + pId.ToString() + ".txt"); //a contains: "Content\\Posts\\2013\\8\\file01.txt...
Chymotrypsin asked 7/8, 2013 at 13:50

2

Solved

I have some code that works fine when I need to delete some image files from a directory on my web server: Dim ImageURL As String = dsImages.Tables(0).Rows(iImgRow).Item("ImageURL") Dim physicalNa...
Johnstone asked 20/1, 2011 at 0:19

3

Solved

I am trying to read an XSLT file from disk in my ASP.Net MVC controller. What I am doing is the following: string filepath = HttpContext.Request.PhysicalApplicationPath; filepath += "/Content/Xsl/...
Roentgen asked 14/5, 2010 at 14:34

3

I have a web application thet has a number of class library projects. Some example code below. public static class LenderBL { static string LenderXml { get { return "MyPathHere"; } } public sta...
Kennykeno asked 15/4, 2013 at 7:33

4

Solved

So I have two functions and I'm getting an interesting problem. Essentially I'm aiming to make my code more portable in an easily includeable cs file. Here's said cs file: namespace basicFunction...
Sora asked 8/5, 2012 at 19:29

2

Solved

I'm building an ASP.NET MVC site where I'm using Lucene.Net for search queries. I asked a question here about how to properly structure Lucene.Net usage in an ASP.NET MVC application and was told t...
Guaiacum asked 25/9, 2010 at 23:32

1

Solved

I have a SignalR hub. When the client disconnects, I want to perform a file operation. To do that, I need to access the Server.MapPath. However, as my Hub class is not an .aspx or a Web Service, t...
Taxexempt asked 5/5, 2013 at 9:22

6

How can I get the virtual path for a full path in ASP classic. Note that the full path may be under a virtual directory and therefore the simplistic virtPath = Replace(fullPath, Server.MapPath("/...
Catherin asked 20/5, 2009 at 14:11

3

Solved

I have the code string xsltPath = System.Web.HttpContext.Current.Server.MapPath(@"App_Data") + "\\" + TransformFileName It returns C:\inetpub\wwwroot\websiteName\SERVICENAME\App_Data\FileName.x...
Accountant asked 29/9, 2011 at 16:0

3

I want to use Server.MapPath() method im order to map a virtual directory I created to its physical path. The thing is that the .net environment doesn't recognize Server.MapPath(). Google told me...
Pennate asked 5/10, 2009 at 9:11

2

Solved

I have a WCF service method that's running in a worker thread I spin from another method. I need to map a relative service app path ("~/Templates/a.template") to the physical path ("D:\Web\Template...
Bornie asked 24/2, 2010 at 23:8

2

Solved

I have a website on GoDaddy. All permissions are set correctly and the image DOES exist. However when the page loads the image for the item selected does not show. Here is my code imagepath = "~/...
Taw asked 12/1, 2011 at 3:45

4

Solved

I need to use Server.MapPath() to combine some files path that I store in the web.config. However, since Server.MapPath() relies on the current HttpContext (I think), I am unable to do this. When ...
Thisbe asked 1/6, 2009 at 17:57

4

Solved

First of all, I am aware that this question is dangerously close to: How to MapPath in a unit test in C# I'm hoping however, that it has a different solution. My issue follows: In my code I have ...
Biannulate asked 11/8, 2009 at 17:7

5

Solved

I'm working with DotNetNuke's scheduler to schedule tasks and I'm looking to get the physical file path of a email template that I created. The problem is that HttpContext is NULL because the sched...
Diazo asked 20/9, 2008 at 20:29
1

© 2022 - 2024 — McMap. All rights reserved.