Security :: FromsAuthentication Doesn't Work On Server
Mar 21, 2010Here's my web.config code:
[Code]....
Here's my web.config code:
[Code]....
The Security is working fine when testing on a local machine, but when it gets published to the server, it seems that It can't get any active directory information at all.
For example, on the local computer <asp:LoginName ID="LoginName1" FormatString="(Welcome {0})" CssClass="loginname" runat="server" /> returns "Welcome DOMAINusername" but when it's published, it doesn't return anything at all.
Using code i've added users to the correct roles and checked they are really in the roles, but security when published won't recognise the current user's name, so it all fails.
I have a problem. I can't get current logged user to my application. Everything is fine on localhost. When I deployed an application
on IIS, it stopped working. I have Windows Authentication Enabled on my IIS. For every account which uses intranet, logged user is the same now, and it's an administration account.
Why application doesn't get real logged user, but administrator account ?
In the login control, the "Remember me next time" checkbox does not appear to work.
If I check it when logging in, when I log in the next time, even a minute later, I go to the login page again.
It seems the cookie is not being written to the client. Can't find it anywhere.
My web.config contains:
[Code]....
I have created a login page using the login control provided by the visual web developer and set up all the accounts and roles using the web admin tool. Everything works fine if I run the page within the developer but when I host it on IIS, The login does not work. It shows the invalid password message from the login control.
View 3 RepliesI have a custom role provider and I'm trying to get the IsUserInRole() method to get called when a user of a certain role tries to access a restricted page. However, the method is never called.
[code]...
When the user goes to a restricted page, I'd like the custom role provider to check the user's role and deny/grant access.
I am using URL routing in asp.net application (not MVC) . I have Admin folder in my aaplication which has admin related aspx pages with seperate web.config. I have seperate login form for admin users which is placed in admin folder itself. My issue is whenever I hit [URL] (which I want to go to login form for admin)- it tries to authenticate and goes to login url mentioned in web.config of root folder.
Note: Admin folder has anonymous access in root config file. Also I have set default document in config of Admin folder. I have added following line in global.asax so that routing doesnt work for files in admin folder;
routes.Add(new
Route("admin/{*resource}",
new
StopRoutingHandler()));
I am really confused what is the issue? What I am missing?
I'm using .net 4.0 and iis 7 and windows server 2008
my web application use form athentication and wok properly in vs 2010
but when i try to config the web site in iis 7 the form athenticate redirection doesn't work without any kinds of error.
here is my web.config code
<authentication mode="Forms">
<forms loginUrl="Pages/login.aspx" name=".ASPXFORMSAUTH"></forms>
</authentication>
<authorization>
<allow users="?" />
</authorization>
I enabled the authentication form in iis.
Does anyone know of any requirements to get the Ajax Control Toolkit (Calendar Extension in particular) working in this OS? I have it working on my local macjine (VS 2010 Development Server) but it doesn't work when published to my Virtual Server running Windows Server 2008 R2. No errors are reported, just nothing happens when I give focus to the Calendar textbox (no Calendar appears).Anyone know of any configutrations that need to be made in Windows Server 2008 R2?Is there a 32-bit/64-bit issue with the Toolkit?
View 8 RepliesI have a Default(contains the sign-out button) and Login page, once the user is not authenticated, it will always redirect the user to login page.
So the scenario is when the user hit the sign-out button it will redirect him to the login page which is good. My problem is, when the user hits theprevious or back button from the login page,it will still read the authorization cookies and redirect him to the default page. which should not be the case. the user should be redirected to login page when authentication is invalid.
I've read some solutions on the net, but still it doesn't work for me. below are the codes I've used for my sign-out function
[Code]....
By the way, when the user is authenticated, the previous or back button is available/enable for the user.
I have an appliaction, that I converted to 4,0 framework. since the conversion the authorization parts doesn't work any more. this
[Code]....
just won't work anymore.... I have madee lots of changes in web..config, so maybe ruined something...where should I look for ?
I have a big problem in using SqlCacheDependency and Sqlserver notification service.I just want to add a dataset to cache with a SqlCacheDependency and get expire notification from sql server , Here is the simple code that doesn't work
(.net 4 , sqlserver 2008)
private DataSet GetData()
{[code]....
I have enabled my database service broker with : [alter database dbName set ENABLE_BROKER] I have created a master key for my databese with : [CREATE MASTER KEY ENCRYPTION BY PASSWORD = '1']
There is no error in sql server log file but when I change my skin table data , my cached dataset still remains in cache , it seems that there is no notification from sql server about changing the result of my Sqlcmd (that the SqlCacheDependency is created on it)
I have the below stored procedure witch has an error I cann't figure out.
What I want: Gets rankOrder. If rankOrder doesn't have a value (= null) the @num should be insertet as 1 as value. If there is a row and a rankOrder is should set the @num to insert the value + 1. The last one works perfect. But when the row I select is emty = null value the value is set to null in the insert command.
Stored procecure:
[Code]....
Why this doesn't work?
[Code]....
Error: The HTTP verb POST used to access path '/WEB_Salaries/Programs/CALC.EXE' is not allowed.
I created a web application which uses AJAX. When I debug the application on my local C drive it works fine. When I move it over to my shared server F drive and debug it, I get permission errors for every time I used AJAX in the web application. The errors look like this:
Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. F:JoshAJAXCCRSchedulingTESTShiftScheduleVsWorked.aspx
I have done almost everything including set my security level to full trust (which is what most people say is all i have to do). I do not know what else to try. Any other ideas? Could it be because I am on the .net framework 1.1 configuration? Do I need to add something to it?
AsyncPostBackTrigger doesn't work on server?
View 4 RepliesI have a column in my .mdf file with the 'uniqueidentifier' datatype. I would like to have it set by SQL Server Express automatically. There are articles on the web that recommend using one of the following commands as the default value:NEWID()NEWSEQUENTIALID()I put this in VS 2010 column properties of my table, in Default Value or Binding. The first command works fine but the second turns out showing an error message 'error validating the default for column xxxx'Any advice on this? I'm I missing much using the first command?
View 6 RepliesI booked new server and transfer old website to there I using in this site the ajax just updatepanel it's was works on old server without need to copy ajax dll to Bin folder after I transferred the site it's doesn't work and no any page error i tried copy ajax dll to bin folder but same problem.
Note:I installed on server .Net 4.0 and the site works on 3.5 also ajax was v3.5 i think the .Net 4 enough to run all.
i am using mod_aspdotnet.so module to hosting my ASP.NET application. all was ok until i use ajax control tool kit in my aplication. I am using ajaxToolkit:CascadingDropDown to conect 2 dropdownlist in cascade. In IIS every thing works fine, but in apache there are some problems. When load the page, i got the next javascript error: 'Sys' undefined. the object signed are :
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('MAIN_FORM'));
Sys.Application.initialize();
How can i solve this problem?
I have 2 html TR that i make them runat="server" & visible="false" and I have a dropdownlist called citiesDropDownList
$(document).ready(function() {
$('#<%=citiesDropDownList.ClientID %>').change(function() { ValidateCity(); });
});
and on change of this dropdownlist i check if the its text equal to a string i show the 2 tr as below
function ValidateCity() {
if ($('#<%= citiesDropDownList.ClientID %> :selected').text() == identity_CityOther) {
$('#<%= otherCityTR.ClientID %>').show();
$('#<%= areasTR.ClientID %>').show();
}
var city = $('#<%= citiesDropDownList.ClientID %>').val();
return IsValid((city.length != 0), '#<%= cityDiv.ClientID %>', identity_CityRequired);
}
.show() isn't work at all and i don't the reason .. can any lead me to get the problem?
FYI : I tried $('#<%= otherCityTR.ClientID %>').show('slow'); and also $('#<%= otherCityTR.ClientID %>').css('visibility', 'visible'); but it doesn't work also.
I have a new web application. I've setup the application and it's working on one server(xxx) but it's not working on another(yyy). I changed the web.config file(checked throughly and I've changed the connection string and appsettings).
What could be the error?
The login page is working but when I proceed a Javascript error occurs...
(Line: 48 Error: Object doesn't support this property or method)
Here's the code
[code]....
The following 'hello world' webservice works fine on my computer (VS2008) but I can't get it to work on the server--either from an aspx page (below) or when invoked directly. I get '404 page not found' on the direct invocation.
[Code]....
I added the HttpGet and HttpPost to test the web service directly on the server. I can open the page and invoke it, but then get the 404 page not found response.
I'm coding a custom control. And I have designed a CompositeControl . There is an property whose type is a complex class(which I designed) in this CompositeControl! And the complex class was added the Attribute [TypeConverter(typeof(ExpandableObjectConverter))] However everytime I try to modify the member of the property in the property panel, it doesn't work !
Although the member is changed in the property panel , there is still no change in the code view !
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[NotifyParentProperty(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
I'm coding in the vs2010 !
If we use an aspx page with a Caching Profile, the server caches images that are loaded with the aspx page. So if ten clients load the same image through the aspx page (same url), for one client the image is gotten out of the db, for the nine others it is cached.When we use a HttpHandler, this doesn't happen. The image is always fetched from the database. We have tried all different settings without any success. (we have checked this link and have not been able to cache on server side).
View 1 RepliesI have a website that is using the ASP.Net report viewer web control which links to our Reporting Server.
We've also built a new WebServer using Server 2008 64bit. I've had some trouble getting this to work in general, but have figured it all out except for this last problem.
When I publish this website to our old WebServer that uses Server 2003 32bit, I have zero problems, the reports pull up as expected. But when I publish to the new webserver, the site works perfectly up until I try to load the Report Viewer page. I don't get any runtime errors, the only thing I get is the picture below. When I open up the IE errors, it basically says that it can't find any of the pictures, and everything is set to a null instance of the object.
I've installed BIDS 2008, the report viewer control and sp1 for it, and have asp.net 3.5, and all of the asp.net development features enabled.
[IMG]http://i144.photobucket.com/albums/r183/B4d_k42ma/rpverror.jpg[/IMG]