.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Loading Static Files in a website from a network share

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :.NET Framework

Hi everyone

Hopefully someone can give me some input on this problem

I have a secured network share which has folders arranged by user Identifiers. These folders consists of HTML files (and their content which is spread across sub folders). The content can be any static file (image,css) etc. All i know (through a config file) is the HTML file i need to load. Then i am blind to its content.

I cannot unfortunately import this folder/files under my web application due to certain security concerns.

Is there any way through my web application(Asp.net 2 and IIS 6) that i can load this file when the request comes through.



View Complete Post

More Related Resource Links

On page loading or executing all CSS flags are ignored and website is plain without formatting


 My problem is whenever i execute my app the first page that loads is the login page pointed to by my web.config file forms authentication, this page is meant to show CSS formatting for the info i am displaying but it is not. Any help with this problem would be great. A cut and paste of my problem is shown below as you can see there is no CSS.

jsfdnjldfngjfg here it is

Account Login
User Id:
Forgot Password?

I have inserted all the link as in:




Search result show unauthorized Files Share


Hi All,

I configured a FileShare content source, the crawl about this source works very fine, but when a end user perform a search on it ,he can show into the search result files that are no access on the file server, but when he click on it of  course he received an access is denied.

How I can filter the search result about FileShare content source to see only files with authorized access?

Thank you for your help,





Share point website connection with Certral administration


Here is the situation , although I have SBS server 2008 I posted this same problem there , but I want here also to ask.

I followed link http://technet.microsoft.com/en-us/library/dd548330(WS.10).aspx and here are the  results.

In SBS console there is companyweb and it is marked as online. DNS also has entry for companyweb and nslookup works.  When I try to recreate internal website , which is described as 2nd step, my IIS server  is started, in IIS7 my website is running, but when I try to see in central administration if my site exist (web application list)  it isn't listed. So I tried to recreate it and I  followed directions from upper link in section repair user access to the internal website but when I want to delete web site , it is not listed. And after when I want to extend I cannot once again because it is not listed. Any suggestions and is there an

Creating Lists On Share-point 2010 Server from .stp list template files using Features

Plz, let me know, how to create list on share-point 2010 server from .stp list template files using features in C#

Map a network share to a virtual directory path @ runtime

Hi Guys Have run into an interesting issue. We have an asp.net web application - we can deploy it over the internet, the secure intranet, local offline user laptops. On of the teams in our organization has a product by which they develop static html reports from the main database. Originally we developed a module in our app which is nothing more than an iframe. Since the html files were pushed under our application virtual directory we used to use java script to set the source of iframe to http://server/app/module/fileXXX.html   Now due to some deployment procedure changes and some security issues the html reports will be deployed on another network server and exposed through a share. Also the share will not have IIS so not virtual directory. So we can no longer set the iframe source through java script to a web file.   Is there any way i can @ runtime map a folder in my application virtual to the network share so that we can browse to these web files like before (Copying the files over from the share to my Virtual Directory is not a very elegant soln.)   Thanks Regards Siddharth

Fast loading of .js Files

Hi, is there the possibility of caching .js and .css files, so that i prevent of reload each time the webform is reload or have a postback. a the moment i use infragistics webgrid and webtab and some jquery scripts. but that in amount over 20 .js files and it takes a long time to load everything. so how can i cache the .js files on the client browser not everytime reload? 

I need a static music player on my website that continues to play music when the user navigates to d

I'm not sure if this is the right area, but I'm needing to have a music player on my website that stays static when the user navigates through my site, and continues to play without interruption.  Currently I have a Flash player that works great, but obviously it stops playing when the user goes to a different area of the site.  Make sense??  Thanks in advance!!

css files not loading when viewing page at http://localhost...

Hello, has anyone had the following problem: css files are in the head element, and the styles are clearly being picked up by the .aspx page when in Design or Split view. Yet when running on localhost, the stylesheet has no effect. And when publishing the website to IIS on a remote server, the css clearly does take effect. I've never seen anything like this... 

Too many javascript files loading?


I recently ran yslow on a page i have (master paged etc) and it returned that there were far too many javascript files included (most of which I haven't added).

I guess my question is that given i have v1.0.20229.0 of the toolkit.dll (over .net 2)

I'm wondering if subsequent releases have fixes for this sort of thing?


Problem with 1st time loading of website



I am facing a strange issue with my website ... If there is a longer inactive period (say a few hours) on my website, and when it is first opened after a longer period of inactivity, it takes almost 50 to 60 seconds to load 1st page.

However, thenafter if you reload the indexpage or open any other pages, they are opening in a few seconds.

This is trace information about opening my default page . (After 8 ours of innactivity)

aspx.page Begin PreInit
aspx.page End PreInit 6,5818664 6,581866
aspx.page Begin Init 6,5971016 0,015235
aspx.page End Init 6,9403593 0,343258
aspx.page Begin InitComplete 6,9404871 0,000128
aspx.page End InitComplete 6,9406603 0,000173
aspx.page Begin PreLoad 6,940708 0,000048
aspx.page End PreLoad 6,9622082 0,021500
aspx.page Begin Load 6,9623434 0,000135
aspx.page End Load 44,5811131 37,618770
aspx.page Begin LoadComplete 44,6315493 0,050436
aspx.page End LoadComplete 44,6571296 0,025580
aspx.page Begin PreRender 44,65722 0,000090
aspx.page End PreRender 45,0207436 0,363524
aspx.page Begin PreRenderComplete 45,0208894 0,000146
aspx.page End PreRenderComplete 50,0494938 5,028604
aspx.page Begin SaveState 50,3189146 0,269421
aspx.page End SaveState 51,6102916 1,291377

Add DLL files to a website using VS 2010


Hi, i have created a simple class:

using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace MCPro
    class DataServer
          Public string GetValue(string value)
                 return value;

i build it by pressing shift+ctrl+B, then i get the DLL from Bin\Debug\MCPro.dll

then on my website i click add reference, then my MCPro.dll was added to the Bin folder, thne i press shift+ctrl+B to build my website and when i try to type"Using MCPro" the namespace or the class is not available in the intellisense??


my reference on this process is this link http://www.c-sharpcorner.com/UploadFile/chitkaran/DLLFile11132007043215AM/DLLFile.aspx


sharing website(asp.net) mdf database on a network in multiuser environment


simple question:


I have create a web site in visual studio with form user authentication.  Thats create a mdf database in this path:



thats use Sql server


i would like to access this database with c# form application on a network with multi-user.

if i change the drive letter of the path above to f:\ (mapped drive) or \\server\c\, i got this message


System.Data.SqlClient.SqlException: The file "h:\Inetpub\wwwroot\website\App_Data\ASPNETDB.MDF" is on a network path that is not supported for database files.
An attempt to attach an auto-named database for file h:\Inetpub\wwwroot\website\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.


i read that

Moving directories/files from the server to another network location


In my asp.net wep application i would like to move the folders from the server to a network location so that the server doesnt get filled up...................

i was able to move the files within the same drive but not to other network locations ..........

So please help me in finding a reliable solution

Install a wcf as a windows service and copy files from a network location



I need to intall a WCF as a windows service. In side this WCF , I need to copy files from a network location to the local machine and run them.

I tried to give a specific user account ( which has access to the shared location)for the windows service processinstaller and install the service. but this account cant host the WCF since it does not have admin rights.

Is there a way to host the WCF using local account.. and then to access network location in side the wcf using a specific account. ( impersenation??/ )

Thanks in advance.





TT Template files not proper generated in website


When I use TT files to generate code, output files within Websites ar never properly generated.

The resut is always some "Chinese character garbage", and the generated extension is always .cs (whatever the given outputextension may be)

Generating text files works fine in class libraries, MVC websites and  other "projects".

Just not in plain websites. Is this a known issue, am I forgetting some swith or doing something wrong, can or can I not fix this?



It seems to be a problem with the Tangible T4 Editor,

after uninstalling this tool, it seems to work fine. However, I've lost syntax highlighting and intellisense then.

Since this is an external tool, I don't think this forum covers that scope.


send files from a server to a storage server on the same network


hi ,

i have a folder on the server which contains jpeg files,mp4 files and also xml files...........

i would like to transfer the folder to a centralised storage server ,i would like to pass the credentials from the web page itself,,,,,,,,

what do i use for it

the storage server is within the network and all it needs is credentials to copy the folder which i m ready to pass....but i dont know the code which has to be used......

whether to use system.io.move



please help me

thank you

Error Handling loading Excel Files with SSIS 2005


I have an SSIS job which watches a directory for new files being submitted. On detecting a file(s) it determines the process to perform on it (based on the file name) and then reads in the file, loads it into the database, and deletes the file. All is fine. I want to add error handling though, specifically for the instance where the worksheet name does not correspond to that defined in the Excel Connection manager for this file.

At the moment if I change the sheet name to be different to that defined in the connection manager, the job fails and so (in turn) the whole process ceases (i.e. the for loop also goes to status failed).

I have tried event handler variables and checkpoints but without success. Could someone give me some advise, or point me to a article that would help?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend