Goal: I need to use Windows Groups to determine access to certain controls on an intranet web app. Specs: 1. I can only use Windows Authentication. 2. IIS6. What I have done so far: 1. I have an application already in use that uses Windows Authentication. 2. I added two new groups each with users to my local machine. 3. I added this code in the web.Config: 4. I have this code in the code-behind of my start page: Dim authUserName As String authUserName = User.Identity.Name.ToUpper.Trim Session("Username") = authUserName If Principal.WindowsIdentity.GetCurrent.IsAuthenticated Then Server.Transfer("main.aspx") End If Questions: 1. How can I determine the Group name of the user when they log in? 2. How can I set up my local machine to test my program?
Harmonium
Posts
-
Windows Authentication IIS -
Server-Side/Client-Side ProblemI have two client-side radio button lists that are interact with one another and are required to submit the form. When a condition is not met a JavaScript alert box is displayed with a message. When the OK button is clicked the server-side methods no longer run. No server-side code works after this point. I am not seeing this problem in the IDE on my workstation, but it does appear on the IIS server so that is what concerns me.
-
Server-Side/Client-Side ProblemI have two ASP.NET Server Side buttons that perform action on both the Server and Client side. Here is the break down of code placement: 1. Server-Side Load: Contains an Add Attribute for a JavaScript event to be fired for onClick(). 2. Server-Side Click for buttons: Navigates the user to a different form state by resetting visibility of panels on the form. 3. JavaScript to perform validation before allowing the Server-Side click to be performed. The problem is that while using the designer I have no problems. All functions work and navigation is perfect. Once installed on the client's IIS Server the Server-Side code is seemingly only triggered when the JavaScript validation is not performed. Once the JavaScript validation displays an error message resulting from an invalid entry the Server-Side code for the form no longer works and the browser must be closed. Any ideas????
-
Writing to FileI need to write out a text file to a users "My Documents" folder from a VB.NET Windows Application. Has anyone else done this and could you help me get started? Thank you,
-
Convert Negative NumberNevermind. I realized that my error was not the negative number, but rather that my value was a decimal and not an Int32. Thanks
-
Convert Negative NumberI have a string data field that I want to convert to Int32 that can contain negative numbers. When I run my code I keep getting an error. What can I do to get this conversion to work? Thanks, Anthony
-
Other Method(s) to Sort DataGrid besides DataViewDoes anyone know of a way to sort a DataGrid without setting a DataView's Sort and then setting the DataSource of the DataGrid to the DataView? Is there a way to sort the data in a DataTable and then add that table to the DataSet? Thank you, Anthony
-
adding controls to datagrid at runtimeYou can also try reading this article. I used it last week and it helped tremendously. http://www.codeproject.com/aspnet/griddemo.asp and http://www.codeproject.com/aspnet/griddemo2.asp
-
Access Click Event in Dynamically Built DataGridThanks again for guiding me in the right direction. Hopefully I can return the favor one day.
-
Access Click Event in Dynamically Built DataGridI got it!!! Once I set page directives EnableViewState to true my post back worked properly. Thank you...:)
-
Access Click Event in Dynamically Built DataGridI read the two articles that you suggested and did not see how to solve my problem. I may have also missed it since my due date for this assignment is this Wednesday. If you have any other information or sites to check out please help. Thank you.
-
how to add scrollbars to asp.net datagridAdding the DIV as mentioned in my last response to this post should also handle the horizontal scroll.
-
Access Click Event in Dynamically Built DataGridI have developed a form with a datagrid based on the code provided by Mark Killmer found here at http://www.codeproject.com/asspnet/griddemo.asp and http://www.codeproject.com/asspnet/griddemo2.asp. My grid requires LinkButtons instead of Drop Downs, TextBoxes, or CheckBoxes. I have the grid populated and the LinkButtons do appear, however I am unable to trigger the click event so that I can move from this form to another form. I tried both methods from his follow-up article, but the server side code is not triggered and the JavaScript code location.href = "http://www.site.com/newpage.aspx" does not work either. Anyone have an idea of how I can acheive this functionality? Thank you, Anthony
-
how to add scrollbars to asp.net datagridMy solution to adding a scrollbar to a DataGrid along with keeping a header with sort ability positioned at the top at all times is as follows: From HTML view I added a DIV for the Header tables and one for the DataGrid so the columns line up properly. I also included some CSS classes that I used in the tables to set the layour for the cells. From the Code Behind file you will need to set a datasource to the grid and control any sorting . Sorting can be controlled from the tablecells in the header table by putting linkbuttons in the place of the table cell labels. You can then call a sort routine with the column name to be sorted to get the sort result you want. I wish I could have made this a quicker response, but the process to get this done is a little cumbersome. Not impossible or difficult, just a bit messy. Hope this helps....