Anonymous Access Disabled?

May 5, 2010

My web app (asp VB 2005) uses Windows authentication. If the user isn't part of a specific AD security group they don't get to edit the data; instead I redirect the user to a read-only page.The program works fine in the IDE.I published the web app to my laptop and Disabled anonymous access. When I ran the program I got redirected to the read-only page. I added a write event to the application event log to see what was going on, and found that the WindowsPrincipal.Identity.Name contained my laptop's ID, not my user name.I reassert: anonymous access is disabled in IIS and the web.config file has Windows Authentication.

View 1 Replies


Similar Messages:

Configuration :: Anonymous Access For Published Web Application?

May 5, 2010

I check WindowsPrincipal.Identity.Name against Active Directory security groups before allowing the user to edit data. If the user is not authorized I just present a read-only version of the data.

When I run my web app from the IDE everything works fine. I published the web app, made sure anonymous access was disabled, and invoked it from IE. The read-only page came up.

I then added code to write to the event log to display the WindowPrincipal.Identity.Name and saw that instead of displaying the user name, it was instead showing the server name. I verified again that Anonymous Access is disabled and integrated security is on.

View 3 Replies

Security :: How To Set Anonymous Access To IIS 7 From Web Config File

Aug 30, 2010

I have developed asp.net 2.0 website with crystal report now what my problem is whenever i go to crystal report page its by default going to login.aspx or default.aspx though i didt set any login to my asp.net page..

I talk with my hosting provider they said that the asp.net impersonate is enable..

I think in IIS 7 authentication if i set anonymous access enable, will it work fine?

so i need to know how to enable anonymous access from my webconfig ..

View 3 Replies

Security :: Authentication / Apply Anonymous Access On 1 (one)

Apr 8, 2010

I have a web site that is using Windows Integrated Security for authentication. Under the site in the IIS there is a virtual directory that inherits these security definitions. Assuming I have several pages under the virtual directory, is it possible to apply anonymous access on on 1 (one) of them?

View 4 Replies

Security :: Windows Auth - Allow Anonymous Access To 1 Page?

Nov 23, 2010

I am working on a site that uses windows authentication, but I have one page for password resets that I want to allow anonymous access to.I have tried doing authorization, allow users="*", but it doesn't appear to work with this.Do I need to have another seperate site for this section?

View 2 Replies

Security :: Anonymous Access, Impersonation, Network Share?

Apr 26, 2010

If you use anonymous access + impersonation of a windows domain account to access a file on a network share, is the password sent in clear text?

View 3 Replies

C# And Anonymous Types - Iterate Through A DataTable While Manually Building An Anonymous Type

Jan 18, 2010

I am currently implementing a client-side paging solution using ASP.NET, jQuery and JSON.

I have been following the excellent article from encosia: http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-paging-using-jquery/

In my Web Method I retrieve my data from the database as a DataTable:

DataTable categoryProducts = ProductViewerAccess.GetCategoryProducts
("AA", 4, 0, Page.ToString(), out howManyPages, "FALSE", 0, "CostPrice", "asc", destinationList);

I then retrieve the data from the DataTable into an anonymous type:

var feeds =
from feed in categoryProducts.AsEnumerable()[code]....

This all works great.

However, I would like to extend the code to perform some evaluation checks (e.g., check that various columns in the DataTable are not NULL) and other pre-processing (e.g., call various functions to build the image URL based on the image ID - which is another column in the DataTable not shown in the code fragment) before I return the resulting rows of the DataTable as an anonymous type to the client-side.Basically, I want to iterate through the DataTable, perform the evaluation checks and pre-processing, while building my anonymous type manually as I go. Or maybe there is a better way to achieve this?

View 2 Replies

Security :: Deny Anonymous Access For Single .aspx File?

Nov 19, 2010

I have a folder called /Error in the root directory for an ASP.Net site. The site is completely public, so there is no authentication of users. Inside the Error folder, I have a file called errorlog.aspx, where I log unhandled exceptions. I don't want the public to be able to view this file. I created a web.config file inside the Error folder.

[Code]....

However, I'm still able to view errorlog.aspx by typing the URL into the browser. What am I missing?

View 3 Replies

Proper Setup For IIS7.5 Machine Account For Anonymous Web Site Access

Jan 22, 2010

Using IIS 7.5, IIS_IUSRS is supposed to be the account to use. I get '401 - Unauthorized: Access is denied due to invalid credentials' error. If I add an EVERYONE account with Read, it works. But rather not have Everyone account. Any idea why IIS_IUSRS does not work? It has Read access. Anonymous Access=enabled. Specific User=IUSR As a side, on the Basic Settings... for the site, Test Settings button says 'ok-on Authenticate' but Authorization 'cannot verify access to path'.

View 1 Replies

C# - Can't Access Control In Form When Viewstate Disabled

Mar 19, 2011

I want to disable my viewstate in a form because its too bulky (about 1mb per page) due to retrieving some data from database and in other place on the same form I want to access a control from my master page. but when I set viewstate of Listview to false I'll get following error: Object reference not set to an instance of an object. what should I do in this situation? veiwstate is too damn bulky
and here is what I've written for accessing particular control:

Control cc = Page.Master.FindControl("mainContent").FindControl("ListView1").FindControl("itemPlaceholderContainer");
foreach (Control ListItemctrl in cc.Controls)
{
Control lblNewsId = ListItemctrl.FindControl("lblNewsID");
if (lblNewsId != null)
{
Type t = lblNewsId.GetType();
if (t.FullName == "System.Web.UI.WebControls.Label")
{
string newsID = ((Label)lblNewsId).Text;
foreach (Control childCtrl in ListItemctrl.Controls)
{
CheckBox ctrlCB = childCtrl.FindControl("chkItem") as CheckBox;
if (ctrlCB.Checked)
{
//based on DDLAction we will do the things ;)
}
if (childCtrl.FindControl("chkItem") != null)
break;
}//end foreach childCtrl
}
}//end outer if
}//end foreach listItenctrl

View 1 Replies

Visual Studio's Access Modifier Dropdown Option Is Disabled For Resource File

Jan 26, 2010

Not sure why Access Modifier drop down is disabled for a Resource file.

View 1 Replies

Security :: Access Denied For Logged User (anonymous User Is Fine)

Jan 7, 2011

I deployed a website where a logged user or an anonymous user can select data and download a XML file. The website generate the XML file in the server and then deliver it.

It works fine in my development environment, but after deployment, the anonymous user can download the file, but the logged user receive this error:

System.UnauthorizedAccessException: Access to the path 'd:HostsLocalUserheringerwebsiteUpload20110107094051.xml' is denied.

It is weird that as anonymous i can do it.

The website server help states this:

"Grant write, modify, delete access rights on website's folder

Your website executes under unique user account that by default has full control over the website's folder.
So your application can create, open, read, write and delete files and folders inside of your root folder.

There is no need and no way to change this permissions.

If, when running ASP.Net application, you still unable to create file or update it, you have to check your Web.Config file for "<Identity impersonate..." tag and remove it.

The only exception is when the application tries to modify a file or folder in "Application_Start" event of Global.asax file. This is by design that user authenticated only after the Application_Start even. Before the user is authenticated your website runs under an identity of Application Pool which is "Network services". That account doesn't have access to the folder of your website.

To make it work you eather have to move the code that tries to modify files or folders out of the "Application_Start" event of the Global.asax file or inside the event you'll need to impersonate your user by code."

But i am not using impersonate and the tag is not in my web.config.

View 2 Replies

Redirecting Anonymous Users IIS 7?

Sep 22, 2010

I am working on an internal application... i setup IIS 7 to use windows authentication since its behind the firewall and on the domain.. there is a "public" side.. and an "internal" side... if your not part of IT.. you should get the public side.. this is just informational.. my problem is that there is 1 or two pcs that are not on the domain and nobody is logged into them.. how can i just redirect anonymous users to another site?

everything i read says you can't use anonymous AND windows auth.. so my thought was to just redirect the anonymous users to another site.. how can you do that?

View 1 Replies

C# And Arrays Of Anonymous Objects?

Jan 9, 2010

what does such expression mean?

obj.DataSource = new[]
{
new {Text = "Silverlight", Count = 10, Link="/Tags/Silverlight" },
new {Text = "IIS 7", Count = 11, Link="http://iis.net" },
new {Text = "IE 8", Count = 12, Link="/Tags/IE8" },
new {Text = "C#", Count = 13, Link="/Tags/C#" },
new {Text = "Azure", Count = 13, Link="?Tag=Azure" }
};

especially these lines new {Text = "IIS 7"... how can I create such array manually to suite this DataSource

View 6 Replies

.net - Get Properties From Anonymous Type In VB.NET?

Feb 12, 2010

I am trying to figure out how to get at an anonymous typed object's properties, when that anonymous type isn't created in the current function.

Specifically, I am binding an ASP.NET ListView to LINQ resultset, then trying to process each item in the ItemDataBound event.

Option Explicit On
Option Strict On
Class MyPageClass
Private Sub Bind()
Dim items As ItemData = FetchItemData()
Dim groups = From s In items Group s By Key = s.GroupId Into Group _
Select GroupID = Key, GroupData = Group
' This works fine:
Dim groupId As Integer = groups(0).GroupID
lvGroups.DataSource = groups
lvGroups.DataBind()
End Sub
Private Sub lvGroups_ItemDataBound(ByVal sender As Object, ByVal e As ListViewItemEventArgs) Handles lvGroups.ItemDataBound
If e.Item.ItemType = ListViewItemType.DataItem Then
Dim item As ListViewDataItem = DirectCast(e.Item, ListViewDataItem)
Dim groupData = item.DataItem ' This is the anonymous type {GroupId, GroupData}
' Next Line Doesn't Work
' Error: Option Strict disallows late binding
Dim groupId As Integer = groupData.GroupId
End If
End Sub
End Class

What do I need to do in lvGroups_ItemDataBound() to get at the item.DataItem.GroupId?

View 2 Replies

C# - Databind Using An Anonymous Type?

Feb 16, 2011

Basically, I have a repeater control, and a Linq query that retrieves some items. Ordinarily I would databind straight to the query and use Eval to populate the template with the results.

However, it doesn't come through in quite the right format - for example, if EndDate is null (it's a DateTime?) then I want to substitute it with "Present". I am using only a couple of the properties in the query result objects.

I am wondering if there's a solution like:

[pseudo madeup code]
var query = getResults();
List<anonymous> anonList = new List();
foreach (var q in query)
{
string myEndDate = "";
if (q.EndDate.HasValue)
{ myEndDate = q.EndDate.ToString(); }
else
{ myEndDate = "Present"; }
anonList.items.add(new { name=q.name, enddate=myEndDate };
}
repeater.Datasource = anonList;

then

<div><%#Eval("enddate")%></div>

View 3 Replies

ADO.NET :: Get Property Of Anonymous Type?

Jan 31, 2011

I use LinqToSql in my project. I have a class called MessageBLL and this class has a method called GetAll which returns List<object>. I returned object because I get data from two tables. Here is my code;

[Code]....

I want to use this in my Default.aspx.cs as like this but intellisense is not show CategoryName :[Code]....suggest me return as IQueryable but I couldn't do it in that way.

View 6 Replies

Web Forms :: Anonymous Profile In MVC With Postgre?

May 21, 2010

I have a Postgre profile provider that runs ok with membership, roles, profiles etc.. But I have a problem.I'm trying to have a anonymous user profile but the provider get an error when I try to save the profile.It says:

Error 23503: insert or update on table "profiles" violates foreign key "pofiles_username_fkey"I configured my web.config with anonymousIdentification enabled, and profile ok, But it seems that when the profile saves, it can not find the anonymous user in the users tables that it's related with profles user. I googled for long time and I think I have all good configurated, but somehow, profiles with anonymous user is not working.

View 9 Replies

Web Development - Configure Caching For Anonymous Only?

Feb 25, 2010

I'm looking for a way to configure caching only for anonymous users only. The reason I'm looking to do this is when users are logged in and they create content they don't immediately see the content. In our old system (linux/php/mysql) we had it configured to cache only the anonymous users and this wasn't an issue.

Right now we have caching setup in the web.config like this

[code]....

I know that I can add a varyByCustom="userName" like this post is talking about. But this doesn't solve my problem. It still caches the users login and the same problem exists.

View 2 Replies

Security :: How To Create Anonymous User

Dec 4, 2010

is there any method in .net framework to create a anonymouse user programaticly or i have to write a method?

View 6 Replies

How To Return Anonymous Type While Using Linq

Jun 30, 2010

Do any one know how to return an anonymous type. I am using Linq where i need to return the following code

private <What's the return type to be provided here> SampleLinq(Int32 Num)
{
var query = (from dept in obj.DeptTable where dept.Id == Num select new { dept.DeptName, dept.DeptId });
return (query)
}

View 8 Replies

MVC :: Using An Anonymous Function For An Action Result?

Oct 14, 2010

i can assign a simple anonymous function and it works, but i'm having trouble with a more complex one.

i am attempting to disable an image button after it is pressed.

any alternatives would be welcome, but i think this is the recommended

[Code]....

View 2 Replies

Authorize A Directory For Anonymous Users IIS 7.5?

Feb 4, 2011

I'm trying to add a directory for anon access in IIS 7.5. It works under Web Dev but not IIS 7.5

I'm currently using this web.config in the directory. This is a directory with style sheets:

<?xml version="1.0"?>

Note: As an alternative to hand editing this file you can use theweb admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in WindowsMicrosoft.NetFrameworkv2.xConfig

<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</configuration>

Update:

I've went to the folder and under Authentication, I've changed anonymous authentication from IIS_USR to pool. This seems to have correct it.

I will reward anyone who provides a very good explanation and resources for understanding this setting. Also, how to apply it globally would be good to know -- for all folders.

View 2 Replies

State Management :: Getting The Anonymous-ID Inserted In The URL?

Jun 7, 2010

I use the sitemap, Web.Sitemap file and the asp:menu control in my website for navigation. It has a few navigation tabs, e.g 'Home', 'First Page', 'Second Page'.....

When I click on the 'Home' tab, it goes to http://www.mywebsite.com/Default.aspx. When I click on the 'First Page' tab, it goes to http://www.mywebsite.com/FirstPage.aspx., and so on....

Everything works as expected.

However, after starting the web application, after a few days a set of weired characters will be inserted to the URL as follows:

http://www.mywebsite.com/(A(8WD4a1wHywEkAAAAMTQzN2FjNDMtOThhMi00ZmNmLWI3YTQtMDY1M2EwOGRmYjliJ-h1Vp9RJnoGNTpb9d3ZfJuoncc1))/FirstPage.aspx.

I checked with the MSDN and found that the strange characters above is the Anonymous-ID embedded in the URL by asp.net (this is the link: http://msdn.microsoft.com/en-us/library/aa479315.aspx)

The tabs still work, and I can still go to the First Page, Second Page... etc. even with these strange characters embedded in the URL. However, once it appears, the 'SiteMap.CurrentNode' that I use in the codebehind always return null, and I can no longer get the 'SiteMap.CurrentNode.Title' property.

And all the submenu will disappear too (I am not sure if it is caused by the SiteMap.CurrentNode problem above or by something else).

I have explicitly set the cookieless mode for the Anonymous-ID in web.config to "UseCookies" as follows:

<anonymousIdentification cookieless="UseCookies" enabled="false" />

but I still get this embedded Anonymous-ID every few days. And once it appears, I have to restart the web application in IIS to fix it. Then it will appear again after two or three days.

how to stop this Anonymous-ID from inserting to the URL?

View 2 Replies

Reference An Anonymous JavaScript Function?

Apr 14, 2010

I'm trying to call a Page Method using a jQuery 'attached' event function, in which I like to use the closure to keep the event target local, as below, but page method calls declare several 'error' functions, and I would like to use one function for all of them. If, in the below code, I was handling an error and not success, how could I use my single, anonymous handler for all 3 error functions?

$(":button").click(function () {
var button = this;
PageMethods.DoIt(
function (a, b, c) {
alert(button);
});
});

This example passes an anonymous function for the success callback. There is only one of these. If I was passing an error callback, how could I use 'function (e, c, t)' for all 3 error callbacks?

ADDED: What I would like to do here is trigger an AJAX call whenever the user clicks a toggle button (checkbox), but to improve responsiveness, I want to toggle the button state immediately, and only 'untoggle' it if the AJAX call fails.

Now, in my client-side click() event handler, I would like to use anonymous functions inside the scope of click()' so that the functions have access to thethisevent argument, but I don't want to 'declare' three functions for theonTimeout,onError, and 'onAbort arguments of the PageMethods.MyFunction function. if I declare a named function outside of the click handler, it no longer has access to the 'this' parameter of the click() event handler.

View 6 Replies







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