asp.net

ASP.NET MVC Custom Authorization

I have a question about custom authorization in MVC. I have a site that I want to limit access to certain pages, depending on their group membership. Now I have seen tons of examples on how to do this if there is a single admin group and a single user group, for example, but not any examples for a third level. For example, only user...

Nested PopupControlExtenders

I have a PopupControlExtender-'A' iside another PopupControlExtender-'B'. When 'A' shows up, it hides 'B' and subsequently hides itself. Has anyone run into this problem? Thanks --Virgil ...

Type casting problem in code behind file

I have the below error message in my asp.net website when i replaced the textbox and put dropdown and named the dropdown id same as textbox id. The value from the drop down should be taken and put in a email body and will be received as mail when i click on the submit button. Below is the error i am getting when i click on the submit b...

Forms authentication against multiple providers (SQl and AD)

We have an application that is for both internal users and external customers. We would like to authenticate against AD for the internal users and against sql membership for the external customers. Has anyone taken a similar approach? Also what is the best way to authenicate against AD when in a DMZ? I would rather have a proxy of some s...

ASP.Net MissingMethodException - "ctor" method not found

We are getting intermittent problems on a production server that we cannot recreate. There are two very strange things about the issue. Firstly it's a method not found error on the constructor (ctor) for an exception handling helper class and secondly we have custom errors switched on for remote users and this property is being ignored....

Using FLASH with ASP.NET - YAY or NAY?

I know i can use AJAX and SILVERLIGHT with my ASP.NET web page. But what do you think about using flash with asp.net? Can this be done? How can this be done? Would you recommend me using flash at all with ASP.NET? I will NOT be using WEB SERVICES, just a plain ASP.NET website. Thanks in advanced! EDIT: What about performance issues??? ...

What are the recommended datagrids for asp.net mvc?

I have looked at a few data grids for an asp.net mvc app I am developing. I would like to get some opinions on the different datagrids for asp.net mvc. I would like to know the pros/cons with the data grid, if you care to share. ...

Message sent from .net System.Net.Mail is not visible on BlackJack II Windows Mobile

Hi, I'm sending a message from my ASP.net page to an email account, the message is sent properly and is viewable in Thunderbird or any other email client I use. But I can not view the message text in my Windows Mobile 6.1 (BlackJacK II) device, I've played around with setting msg.BodyEncoding = System.Text.Encoding.Unicode; or ...

Is it possible to use the "impersonate" function with a string (username) rather than intptr?

The System.Security.Principal.WindowsIdentity.Impersonate function takes a System.intptr parameter, which seems awfully useless in my situation (with my limited understanding). I am developing an intranet application that uses integrated security to authorize users page-by-page against a role associated with their Windows Identity. I...

How can I impersonate a different user while opening a virtual directory?

We have an ASP.NET (3.5) application which uses Forms Authentication to authenticate accounts. On the logon form, I also get a windows login token using LogonUser, which I use to impersonate the logged on user for browsing private directories (the files are displayed in a GridView, and the user is impersonated just before the data is bo...

How do I create instance of HttpContext?

Currently, I'm receiving the error "an object reference is required for the nonstatic field method or property". My code is as follows: using MyApp.Global; namespace MyApp.MyNamespace { public class MyClass:System.Web.UI.Page { //Toolbox is inside Global, GetCurrentCookieData is a static method private CookieDat...

How to change this find control for drop down to text box?

I am trying to select a value from a drop down control before it was text box. I have given the same ID for drop down which was similar to the text box. Below is the code: Do counter=counter+1 tempPanelInputBox = form1.FindControl("txt_" + panelUsed + "_input" + counter.ToString()) Loop untill counter=CounterEnd a...

w3wp crashes when starting debug in VS 2005

I know there were a couple similar questions, but none solved my problem. This issue just started within the last couple of days. I don't always hit VS everyday, so I can't say for sure when it began. When I start debugging, the app loads in IE, but the w3wp process dies with the message "The program '[9252] w3wp.exe: Managed' h...

Any easy way to get row count in sqldatasource without writing any code?

I want to get row count of SqlDataSource after binding. ...

Getting Accessibility Error on Public Object

namespace MyApp.MyNamespace { public class MyClass:System.Web.UI.Page { private DataUtility Util = new DataUtility(); private CookieData cd = MyClass.Toolbox.GetCurrentCookieData(HttpContext.Current); //below I get the error: "System.Web.UI.Util is unavailable due to its protection level" private i...

ASP.net user management and GoDaddy shared hosting

I'm trying to use the asp.net (3.5) built in user management framework but I'm not 100% sure how to do this on godaddy. Google didn't help much, anyone have experience with this? ...

ASP.NET gridview binding doesn't work / control doesn't show up

Hey there, another beginner problem. Why isn't the following code with an asp.net page not working? protected void Page_Load(object sender, EventArgs e) { List<string> list = new List<string>(); list.Add("Teststring"); this.GridView.DataSource = list; } GridView is the GridView control on that asp page. However, no grid ...

Do you disable viewstate by default when developing asp.net webform ?

we know that view state is easily get abused, but asp.net webform are heavily depending on this feature. I want to know whether you disable viewstate by default, and ONLY add it wehn it's needed. Or you take the visual studio default, which actually enables viewstate by default. ...

Problem with ASP.NET control event handler from the Properties window

I assume I am not the first one having this problem and I am normally pretty good at googling for stuff but in this case I didn't succeed in finding a solution, so I'll post it here. I have some experience in VB.NET and WinForms, now I am working on an ASP.NET project and I decided to do it in C#, so I can learn more technologies / lang...

How can I call a JavaScript function defined in a PartialView after an AJAX request completes?

Here is my partial view: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <script type="text/javascript"> function myFunction() { .... } </script> ....other html content ... On my page, I have a link that calls a controller action to render the partial view: <%= Ajax.ActionLink(..., new AjaxOptions { ..., On...