Asp.net - Prevent Site Directory From Being Displayed?

Jan 13, 2011

I have a subdomain on which I have put up all the js code for my webiste to interact with another application. For eg: at code.example.com Whenever, the user types this address,code.example.com, all the contents of the directory are listed. How do I prevent this thing? I do not have nay index.html or index.aspx here.

View 1 Replies


Similar Messages:

C# - How To Prevent System.IO.Directory.Delete(pathtodelete, True) From Giving Me A "Directory Is Not Empty" Error

Jan 21, 2011

I am writing an online interface that will allow a site owner to modify files and directories on the server.

I have gotten inconsistent performance out of System.IO.Directory.Delete(PathToDelete, true);. Sometimes it works great, sometimes it throws an error. My controller looks like this:

[code]....

View 2 Replies

Directory Listing Displayed Rather Than Webpage?

Mar 11, 2010

I've just started developing a web site in VS 2008. When I try and view the page (click 'start debugging') an IE window pops up displaying a directory listing of all the files in my web application directory rather than my masterpage or content. Why is this and how can I correct it?

View 2 Replies

How To Prevent AppDomain Recycles In IIS 7.0 When Deleting A Sub Directory

Jan 20, 2010

I have an asp.net web application that allows users to upload files to an 'uploads' directory that is located in the same virtual directory as the web app. Each uploaded file goes into a temporary sub directory that is named after the user's session id. Once I'm finished with the files, I delete the temp sub directory. The only problem is that when a sub directory is deleted, the AppDomain gets recycled and kills all user sessions (using inproc session state). The culprit appears to be a FileChangesMonitor that watches for changes in all sub directories in the application.

The following code works great in IIS 6.0 running on Windows Server 2003 to disable the FileChangesMonitor for sub directories, but for some reason it's not working in IIS 7.0 on Windows Server 2008:

System.Reflection.PropertyInfo p = typeof(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
object o = p.GetValue(null, null);
System.Reflection.FieldInfo f = o.GetType().GetField("_dirMonSubdirs", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.IgnoreCase);
object monitor = f.GetValue(o);
System.Reflection.MethodInfo m = monitor.GetType().GetMethod("StopMonitoring", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
m.Invoke(monitor, new object[] { });

I found another solution that disables the FileChangesMonitor altogether here. But this is not the ideal solution as I still want to monitor all other files except for the temp sub directories in the 'uploads' directory. Why does this work in IIS 6.0 and not in IIS 7.0? In IIS 7.0 can you specify sub directories in a virtual folder you want to disable recycling on? Is there another way to do this without using reflection?

View 2 Replies

Configuration :: Images Not Been Displayed After Web Site Deployment

Feb 17, 2011

I can see all the.jpeg and .gif images when I execute site through my code, but after site deployment in Windows server, those images on web page is not been displayed.

I have given sourece
as below..

For update progress..

<asp:UpdateProgress
ID="UpdateProgressMaster"
runat="server">
<ProgressTemplate>
<panel>
<img
align="middle" src="/Images/ajax-loader_Wait.gif"
/></td>
</panel>
</ProgressTemplate>
</asp:UpdateProgress>

For DIV

<div
style="background-image: url('/Images/Main_Menubar.jpg');">

View 4 Replies

Security :: Prevent Users Browsing Files When Typing Directory?

Apr 7, 2010

I have directories in my website which require authentication.

But when i type the url with the directory name it lets me see the files but doesnt allow access as users need to login.

How can i stop users viewing files if they manually type directory name in?

View 5 Replies

.net 3.5 - Prevent Site From Being Screen Scraped?

Apr 24, 2010

How can I prevent my asp.net 3.5 website from being screen scraped by my competitor? Ideally, I want to ensure that no webbots or screenscrapers can extract data from my website. Is there a way to detect that there is a webbot or screen scraper running ?

View 7 Replies

Configuration :: Prevent Website Visitors From Browse The Directory Pages And Folders?

Feb 24, 2011

If my application URL is this:

http://localhost:51422/MyApp/Pages/FormView.aspx

I want 2 things:

1- I don't want any people to delete "...../FormView.aspx" and go to this[URL] and browse the directory pages and folders names.

2- If anybody tired that, the application should redirect him to login page or home page.

View 5 Replies

Forms Data Controls :: How To Prevent A Directory Showing On Template Field Hover?

May 11, 2010

i have a template field which shows a picture of a paper clip. Upon click it will open a file from a shared directory. It is a basic application for Expense Reimbursements in which users are allowed to upload scanned expense receipts. After the receipts are uploaded they can also be viewed by clicking on the paperclip icon. hile I want them to be able to save and open the files from the shared directory, I do not want them to know what the directory name is. I want to prevent them from viewing other user's expense receipts. Share name: \serverAExpenseReceipt$

[Code]....

definition of the template field above.

View 5 Replies

Mixed App Session Dies / Run The Site And Login To The System, An Error Message Is Displayed?

Dec 8, 2010

I have a site written for ASP.NET using a library written for ASP. The library resides in a dll and the site calls it to get the number of leave days an employee has left from a database. The dll was outsourced so I don't have access to the source.

I've set up the database and visual studio project locally. When I run the site and login to the system, an error message is displayed where the leave days should be displayed but the site runs normally. If I register the dll using regsvr32, the leave days are displayed when I login, but when I try to browse the rest of the site, the session is dropped and I'm automagically logged out. If I deregister the dll, then I can browse the site once I've logged in again but, once again, the error is displayed.

View 1 Replies

Security :: Prevent From Cross-Site Scripting Attack?

Oct 15, 2010

a major problem from Cross-Site ScriptingAttack, Below is sample script which automatically gets inserted into my HTML and ASPX Pages.

"<script src=http://avidmarketing.ie/images/rc3/companybuttonwhite.php ></script>"

View 5 Replies

Web Forms :: How To Prevent Cross Site Scripting In Bll Layer

Jan 21, 2010

To have a better secure application, we have to prevent cross site scripting.

I have application that use a bll.

All inputs have to pass bll before they were pass to database.

To prevent cross site scripting, is bll the correct place to validate the input?

To be exact, are all the properties of object should be validated?

View 9 Replies

Security :: Prevent Unauthenticated Users From Seeing Non .Net Pages On Site?

Apr 9, 2010

I have a folder within my website called 'ProtectedPages' which contains pages which users can only see if they have logged in (MyAccount.aspx etc). If they bookmark that page and try to go to it without logging-in, they are immediately bounced to my login page.However, if I have text files, images etc. in there, then it seems users can get to these fine without the need to login - all they need is the URL. For example, I could send the URL http://mysite.com/ProtectedPages/MyAccount.aspx to a friend and he wouldn't be able to access it until he had logged in. However, I could send himttp://mysite.com/ProtectedPages/ATextDocument.txt and it would show it to him without any problems.How would I go about protecting ALL files within this folder? I have a web.config file within the ProtectedPages folder which just has this information in it (I don't want TrainingAdministrator's to have access to that folder at all)

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>

[code]...

View 7 Replies

Security :: Prevent Injecting Malicious Code In Site By Hackers?

Jul 14, 2010

I am in trouble in to remove malicious code from our so many site , develope in asp.net andn in asp.

Most of the time hacker inject the code in Body tag at onload evenet and also at the end of html tag using Java Scriprt.

how to prevent it by programing a code in asp.net or in java script or by other...

View 1 Replies

Security :: Intranet Site Authentication Against Active Directory?

Oct 2, 2010

I am trying to build a web app for an intranet site that for security reasons needs to make the user type in their Windows or Active Directory username pwd manually. I have previously worked with Integrated Windows Auth but in this case, we do want them to use type in their AD credentials.

I have been trying to look up how to do this and frankly I am a bit lost. It should be a fairly straightforward task and am hoping you can point me in the right direction, with some tutorials or examples. We will be using SSL so, dont have to worry about passing pwd in cleartext over the wire.

My environment is visual studio 2008 in C#, .net 3.5 if that matters.

View 1 Replies

Security :: Site On The Same Domain As The Active Directory Server?

May 26, 2010

a asp.net site located at a hosting center(UK)and i want users from our office to login to that site using their active directory account.is this possible to do over the network ? or i need the site on the same domain as the active directory server?

View 3 Replies

Configuration :: Publish Site Into Domain Name Via Local Directory

Feb 27, 2011

I have created a website that has one aspx page. I am using visual studio 3.5. I have created a virtual directory on my local pc and tested the app and it wis working. Now I need to delploy it to the domain via ftp> Here is the website folders:

1. App_Code - contain my classes
2. App_Data - contain the sql express database ... myDb.mdf
3. Myaspx page - a single page
4. Web.config

when I run it , it woks, but when I want to deploy it , the site does not work. Here what I am doing .I am publishing the site to a local folder, then upload the complete folder to the right domain name. Yet, get an error

"Error 1 The process cannot access the file 'B:&#65533;0 2011 demoMarchObjectDataSource_CRUD_CSApp_DataRGN.mdf' because it is being used by another process"

How can I fix this error. I thought when I publish the site, the database would also be included in the site folders, but I may be wrong.

View 2 Replies

Installation :: Getting HTTP Error 500.19  When Publishing A Site every File In The Directory?

May 31, 2010

I have installed Windows 7 Professional and Visual Studio 2010 on a machine I was using VS2005 on with Windows XP. I am unable to publish to c:inetpubwwwroot. The files cannot be deleted in wwwroot or edited. I turned off read-only and am still unable to edit anything in the root even when opening something in notepad. When publishing a site every file in the directory throws the following in VS.

"Error deleting file 'what_is_a_puppymill.aspx'. Unable to delete default.aspx'. This function is not supported on this system."

View 7 Replies

Security :: Authenticate Against The Active Directory When The Site Is Hosted Remotely?

Mar 25, 2011

I am trying to develop a internal corporate portal that will be hosted external either on company leased decicated server or by hosting service like godaddy. The company portal is going to have links internal and external resources like Outlook Web Access and Sharepoint, Great Plains, our CRM software, etc, etc. I am basically creating intranet site for the company but the intranet is going to be hosted externally.

How do I authenticate user against the Active Directory, when the intranet site is hosted remotely?

View 1 Replies

Configuration :: Virtual Directory Targeting Newer Framework Version Than Parent Site?

Mar 25, 2011

There is an existing asp.net 2.0 app on an IIS 6 server. I need to add a feature/page to this site (third party app, don't have source code). I'm creating my tool in VS targeting dotnet 4. For end user convenience I need my tool to be available within the same url namespace as this .net 2.0 app. I assumed I would just create a new virtual directory within this existing app to put my app. But I hadn't thought about the different framework versions.... the web server does have v 4 installed. So can I create my virtual directory and host my v4 tool there, within the v2 website?

anything I should be aware of to make that work?

View 13 Replies

Active Directory/LDAP :: Auto Login To Site When Client Logon Success To Domain Controller?

Jul 15, 2010

I have a DC (Win 2K3,IIS 6.0..) and put my site there. I have a local computer (win XP2) with computer name PC1 is already joined to the DC. in PC1 I login with account (user: abc, passs: 1234567) was created on the DC to log on to domain. After successful login into the domain, andand type in my web address, so I have to write code in my web site to understand how abc account login to the domain will always login to the my site must be signed in .not logged in login module that in my site.

I have a DC (Win 2K3) and put my site there. I have a local machine (win XP) with PC1 name is already connected to the DC. PC1 I log in with machine account (user: abc, passs: 1234567) was created on the DC to log on to domain. After successful login khj me on my website, so I have to write code in my web site to understand how abc account login to the domain will always log into the site must be signed in toi.khong Login Module.

View 1 Replies

Will CLOB Data Be Truncated When Displayed In A Select Query? If So, How Can It Be Displayed

Jul 1, 2010

I've got a Varchar2 field in my table which I want to convert to a CLOB. I am unsure whether the data would get truncated when selected. If so, what is the limit and does it depend on the database settings?

In my TOAD or SQLPLUS window it gets truncated but this may just be the environment settings. I'm not sure whether it would get truncated in my actual application (I can test this, but up to what size should I test?)

If it does get truncated, what's the best way to display the whole CLOB? There are other fields in my SELECT query, so I think I can't just loop through multiple rows. Is there any way out?

View 2 Replies

Virtual Directory Root Vs Default Web Site Root

Feb 11, 2011

I am using iis 5.1 in which we have only only one default website, I have two projects v2 and v3 my website points to v2 projects and have some folders images, styles etc now i have a virtual directory under this website that is hosting project v3 and having the same folder hierarchy as v2 in the home page of the both projects i have img src="imagesedlogo.gif" alt="logo"/> but this shows the same image that is in the v2 directory, How can i show different images for both projects. using "" get the root of the web site but how can i get the root of virtual directory under that website

View 2 Replies

Active Directory/LDAP :: Using System.directory Services Namespace In Framework 2 To Query Active Directory?

May 5, 2010

I am using System.directory services namespace in framework 2 to query active directory. I have used fixed user account impersonisation in the web.config file, find the code:

<identity impersonate="true" userName="enterprise ang09" password="Telcome123"/>
<authentication mode="Windows"/>

I have disabled anonymous access in IIS. Also i have given Read & write access to the account tang09 for the website virtual directory and Microsoft.NET folder located in windows folder. But still i get prompted for the domain username and password to access the website.

View 4 Replies

C# - SilverLight LineSeries Graph - Graph Being Displayed But The Line Not Being Displayed?

Nov 3, 2010

I been stack for the last few days trying to figure out the SilverLight 4 LineSeries graph, for some strange reason the graph being displayed but the line not being displayed. I am pretty sure that my mistake is something very basic but I been straggling to pinpoint the problem by myself.Bellow is the code that I having problem with.

<toolkit:Chart HorizontalAlignment="Left" x:Name="chartLine" Margin="31,35,0,0" Title="Chart for test" VerticalAlignment="Top" Height="233" Width="309">
<toolkit:LineSeries IsSelectionEnabled="True" HorizontalAlignment="Left" DependentValuePath="Y" IndependentValuePath="X" [code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved