C# - Block Certain Ip's (users) To Access Website?

Apr 20, 2010

anybody knows of blocking certain users (by IP) from accessing your website (website on asp.net mvc).

EDIT: I know that web-servers can do this as well, but I need this at the application level

View 3 Replies

Similar Messages:

How To Have Website Block Access To IE6

Mar 29, 2011

How can I have my website block access to IE6? Redirecting it to a custom error page.

View 3 Replies

Architecture :: Give Access To Users (like An Intranet) Discreetly On The Website

Apr 22, 2010

I'm quite newbie and i need to give access to the website at a very low cost, but just few people, how did you guys manage it, to hide the connection link to the public. I mean is there a better way or not to manage this. I don't know if I'm clear. What would be the cheapest way to manage this user account?

View 4 Replies

Block Users To Log On To Web Application Twice

Nov 25, 2010

i have users who can logon to my site. I don't use the asp.net provider (i have my own user storage) but do use forms authentication. No i want to block users from log on twice to my app. Now what is the simplest thing to accomplish this? I thought about an extra field in the database in the user record but is there something simpler? is there a sort of 'session' for the entire application where i can remember who is logged on (and which is not flushed at a random time)? maybe in the cache (but the cache is sometimes flushed) i've seen an example where a file with the username was written to disk (and removed when logged out)

Good question was: what do you mean with logon twice. I mean when a user logs on on another computer or when another person logs on with the same credentials

View 3 Replies

Block Users From Directly Linking To The PDF And Bypass The Email Step?

Feb 12, 2009

I have a page that requires the user to input their email address. The page then redirects to a PDF page. My problem is, how do I block users from directly linking to the PDF (mysite.coom/pdfdoc.pdf) and bypass the email step. I'd like there to be some kind of validation, perhaps the url will look like mysite.coom/pdfdoc.pdf? email=[URL]. If the email parameter is missing redirect to a different page.

View 2 Replies

How To Create An Access Keys Page To Enable Users To Go To A Certain Page Of Website

Apr 6, 2009

Does anybody know how i can create an access keys page to enable users to go to a certain page of my website? I want to make my website more accessible..?

View 10 Replies

C# - Administer Website (create New Users, Assign Users To Roles, Etc.) From A Windows App?

Feb 9, 2010

I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functionality in the web app itself.

Here is the membership provider definition from web.config:


So, obviously, I have a Sql Server database that contains the users and roles for the web app. I'd like to create a separate windows app that references the web app assembly, and use the configured MembershipProvider, RoleProvider, and machineKey to create users, assign users to roles, etc. If that's not possible, I can duplicate the configuration settings from web.config within the windows app. But I don't know how to do this either.

View 3 Replies

Security :: Allow Admin Users To Access Basic Users Accounts?

Aug 26, 2010

Allow Admin Users to Access Basic Users Accounts?

View 4 Replies

Block Ip - Remove User Who Break Website

Mar 29, 2010

I am making a website in asp.net c# code behind. My client told me that he want to remove the user who break the website law and then that particular user can create another account in our site with different emailid and password.

View 7 Replies

Searching For The Script To Block The IP Address In The IIS For Website?

Aug 19, 2009

I was searching for the asp.net script that can block the entered IP address in the IIS for a particular website. IP and the website name can be input to the script.

I found the script at [URL] but I do not have the necessary class files needed for running the script.

View 4 Replies

Block Videos Or Blogs On Website In IE Browser Through C# Coding

Dec 7, 2010

I strucked with one problem in C#.net coding part, my problem is "how to block the videos in website on IE browser" through the C# coding. actually i am developed one toolbar for IE browser so in that toolbar i added one button for block the videos,so when i click in that toolbar button that time in IE browser website videos are blocking

View 6 Replies

Security :: How To Block Specific Ip Address From Visiting The Website

Oct 26, 2010

is there any java script that i can put it on my master page and block specific I.P address ? And navigate the user visiting from that blocked I.P address to a different page ?

View 8 Replies

Data Access Application Block VS LINQ To SQL For ASP.NET Apps?

Apr 30, 2009

Have investigated and tested Data Access Application block from Microsoft Enterprise Library 4.1, which has impressed with best practises and fewer lines of code to interact with Database.

Cons: Requires us to supply / write SQL statements


Have watched an hour video here and impressed with in-built support for Joins/Stored Procedures/Transactions.It is feasible to express and perform Joins between Tables using C# language. Behind the scenes the Query Engine generates actual SQL Join statements.

May still consider Data Access Application block from Enterprise Library where a single line of code can perform CRUD(create,Retrieve, Update, Delte) oeprations. still it requiers to supply complex sql statements here.When LINQ to SQL:- learning curve for new syntax and indeed it is hiding complex queries job from us.Which way to go?? Data Access Application block OR LINQ to SQL??

View 1 Replies

Security :: To Set EnvironmentPermission/ Block User To Access Web.config?

May 7, 2010

I know a user can use the following code to access the content of web.config
string connectionString = ConfigurationManager.ConnectionStrings["MyConnect"].ConnectionString;

If I set EnvironmentPermission, can I block user to access the content of web.config?

View 1 Replies

Web Forms :: Block Direct Access Of A Page Through Browser?

Dec 9, 2009

I have a situation where I have a page "image.aspx" which displays an image from a stream using Response.OutputStream. Other pages make use of this page by calling "image.aspx" in <img src="image.aspx" />.

Now, the issue is that if a user directly access the page "image.aspx" in a browser, he would be able to see the image. I would like to restrict such access. It would be great if you can let me know how I can make this possible. I would like to acheive this without using Session.

View 12 Replies

C# - Block Access To Files When Using The System.Web.Routing.UrlRoutingModule?

Jan 22, 2010

I'm using the System.Web.Routing.UrlRoutingModule.

With that I'm writing:

routes.Add(new Route(@"cart/add", new RouteHandler("~/Order/CartAdd.ashx")));
routes.Add(new Route(@"cart/delete", new RouteHandler("~/Order/CartDelete.ashx")));

And I also have one route called:

routes.Add(new Route(@"{*url}", new RouteHandler("~/Error/PageNotFound.ashx")));

But if I go directy to /Order/CartAdd.ashx I never enter the routing. It goes directly to that handler. And if I go to /Order/ I get a 403.14 error.

How do I instead catch those urls with the routing?

View 1 Replies

Application Block Connection String From Data Access Layer

Jun 4, 2010

I am making use of 3-Tier architecture while making my project. And in Data Access Layer I am making use of application block, but application gets a connection string from web.config; but ClassLibrary of Data Access Layer doesn't contain web config file. How can I access connection string from Data Access layer?

View 5 Replies

Security :: Block Access To Folder (directory) With Authentication Mode = None?

Aug 14, 2010

I have a problem in my asp application. In my application I have an own authentication mechanism so in the web.config file I have <authentication mode="None"/>

Inside the application users can upload files to the folder I've created (App_Files). I would like to give access to the folder only once they are logged in (Session["Login"] is no null).

I dont want not logged in users to be able to access the files over a url address in the browser (like http://<server>/App_Files/Filename.pdf)

View 7 Replies

.net - Using RouteExistingFiles To Block Access To Existing Files Even If No Route Exists?

Mar 28, 2010

In ASP.net MVC 2, I can use routes.RouteExistingFiles = true; to send all requests through the routing system, even if they exist on the file system.

Usually, this ends up hitting the "{controller}/{action}/{id}" route and throws an exception as the controller cannot be found.

I do not want to use that route though (I have only a few URLs and they are specifically mapped), yet I would still like to prevent access to the file system.

Basically I want to Whitelist pages using IgnoreRoute. Is there a built-in way to do this?

My current approach is to still have a route "{*anything}" and generate a 404 when this is hit, but I'm just wondering if something is built-in already?

View 1 Replies

Security :: Folder Security / How To Block Anonymous Users

Jan 12, 2010

I have a web page where I am denying anonymous users from accessing. In the web site I have a folder called FileManager. In the web app the usres have the ability to uploaded files and when they do a folder gets created under the filmanger and the files are saved. I have created a web.config in this folder that denies anonymous users. The problem is if the user knows the directory structure they can type in the url of the site add /FilManager/x/x/NameOfFile, where x are the sub directories. If the file is an image it shows the image in ie, if it is a .xls or .doc or what ever they get the prompt to either download or save the file. What am I doing wrong. Will the web.config file not stop an anonymous user from access files? I put a webpage in the folder and it is blocked and the user gets sent to the login screen, but files seem to be unsecured.

How do I block anonymous users from being able to access the files in this folder?

View 4 Replies

Block Direct Access To .aspx Pages Using IIS7's URLRewrite Module?

Mar 30, 2011

I am using IIS7's URLRewrite feature to hide the .aspx extension in my ASP.NET WebForms application's URLs.

I'm using the following configuration:


I can now browse to:


and this is rewritten to:


This preserves the "pretty" url in the browser address bar. I have also updated all my links on the site to use the extensionless URLs.

The problem is that the underlying .aspx pages can still be accessed directly and I'd like to prevent this.

If a user browses to [URL] I'd like it to either redirect/rewrite to [URL], or at the very least just return a "Page not found".


I managed to get this working by redirecting all .aspx pages to the home directory. This isn't ideal as I'd prefer to send them to the non-.aspx version, but it will do for now.

<rule name="Block .aspx" stopProcessing="true">
<match url=".aspx" />
<action type="Redirect" url="/" />

How do I rewrite and redirect URLs that directly address .aspx pages to my friendly URL format?

View 2 Replies

Localization :: Multilingual WebSite - Allow Users To Translate A Compiled Website

Jun 10, 2008

I have a multilingual web site where all resource files a located under "App_GlobalResources". Any time i need to add a new language i just copy the resource files, translate and rename it. Everything works just fine.

The main idea is distribute the web site and let people customize it to their own language by translating the resource files, the problem is when the application is compiled the resource files disappear (it's compiled as a single dll as well) even if i check the option "Allow this application to be updatable" (on the "Publish web site window"). Does anyone already worked with a solution for a similar problem? I believe if there is way to leave the App_GlobalResources folders out of the compilation process, it will work for me.

View 7 Replies

DataSource Controls :: Unable To Use EntLib 5 Data Access Application Block With ObjectDataSources

Feb 9, 2011

my page is very simple, one gridviews and one ObjectDataSource.here's my code :

<%@ Page Title="" Language="C#" MasterPageFile="~/site.Master" AutoEventWireup="true"
CodeBehind="default.aspx.cs" Inherits="cHospital._default" %>

I also posted my question on another web site, one suggestion I got is move my codes to codebehind


But this is ObjectDataSources, my understanding is everything have to stay in Class file.

View 1 Replies

Access To A Network Folder And Windows Users That Has Been Granted Access?

Nov 10, 2008

I'm using VS2005,VB.I have a web page used by our HR people that accesses employee photographs & data [Name, Hire Date . . .].

The folder that the photographs reside in has had a user 'Everyone' that has 'Full Control'.I would like to take that 'Everyone' user out completely and leave only specific,authorized network Users with access to the photographs.Currently, all the network Users & UserGroups that DO need to be able to access the folder have been given Access - [including the network Server machine name on which the web site resides].However, when I remove the 'Everyone' user from the permissions for the folder - my web app gets this error:

'Access to the path
\SomeNetworkDriveSomeFolderEmployeePhotoFolder is denied.'

My web.config file has - <authentication

I've tried adding <identity impersonate = "true"/> - but that doesn't work . . .

I'm not sure how to put this in the correct Programming terms,but I would like that folder to look at my web page & determine if it is being run by one of the windows users that has been granted access-and if it is,then let it through.

OR, if it is posible,I have read something about granting access to the ASP.NET user - but I don't know how to do that either.

OR . . .

If I can make the web page "tell" windows that it is one of the authorized users . . .

View 6 Replies

Access :: Error When .aspx Page Tries To Connect To Access Database Through Website / Access To Path Denied

Dec 7, 2009

I'm a newbie to all of this so am just feeling my way along here. This is probably a simple solution - but i haven't been able to figure it out. I have an .aspx page that is making a call to an Access database through a accessdatasource link. When I run this page on my local computer, it works fine. I uploaded all of the files to my website (hosted through a 3rd party) and also uploaded my database to the assigned location, I then changed the aspx file so that the "Datafile:" description of my accessdatasource object points to the absolute path of the new location of my database. When I try running the page on the website, I get this error:

System.Web.HttpException: Access to path 'D:Hosting5296980htmlaccess_db est.mdb' was denied. The location does not exist or is not accessible because of security settings.

I double checked that the test.mdb file truly is there and the permissions on that directory are all readable and writable. Am I missing some other security setting?

View 5 Replies

ADO.NET :: Using Enterprise Manager Data Access Code Block And Have A Table In Sql Server 2005 With A Column Type Of 'bigint'?

Aug 4, 2010

Im using enterprise Manager data access code block and have a table in sql server 2005 with a column type of 'bigint'

when querying against this table and adding in a parameter, there isnt a long datatype available, so is Int32 an equivalent ?


View 1 Replies

Access :: Need To Have Multiple Users Using The Same Access 2007 Db?

Oct 6, 2009

We need to have multiple users using the same access 2007 db. The problem I have is I am looking for the properties of what is locked (i.e. record, page, or db level) and I can't seem to find it anywhere. Is there some way I can set the entire DB to record level locking?

View 1 Replies

Access :: Database Access From Website Is Sluggish If MDB Open In MS Access?

Sep 24, 2009

My asp.net application accesses a MS Access 2003 database.

When the website has exclusive access to the database, response time is almost instantaneous.

If the database (mdb) file is open in MS Access, however, then the website slows to about 15 seconds per page.

View 6 Replies

Web Forms :: Menu Item Block / Master Page That Has Block Around The Text When The Page Is First Run?

Jan 29, 2011

I have menu item on my master page that has block around the text when the page is first run. I wrote in the css on the link and visited property to change the color to match the image color that it is on. When a menu item is clicked the color changes to the right color. How do I get it to the right color on when the page first opens or is there a way to get rid of the block or make it transperant?

View 1 Replies

To Reach A Variable From A Different Code-block Expression Than The Block Where The Variable Was Declared ?

Oct 25, 2010

I have 2 separate code-block asp.Net expressions in an aspx markup, with an html content between (span element in the example below). In the first code-block, there is "i" as an increment variable for the for loop.Then the code-block is cut with an html content.And another code-block expression is opened but as I see I can reach the "i" variable which was declared in the previous code-block.

So, how asp.net handles -compiles- the pieces of code-block experrions declared in the mark up? Does it check the semi-colons and generates some anonymous methods which will end up with many calls to Response.Write in the last place?
<%for (int i = 0; i < 30; i++)


View 2 Replies

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