asp.net

Is it possible to have location authorization nodes in a web.config be external?

Is it possible to have location authorization nodes in a web.config be external? Such that I could take all of the nodes simlar to <location path="elmah.axd"> <system.web> <authorization> <allow roles="Administrator" /> <deny users="*" /> </authorization> </system.web> </location> <locati...

How to keep long running NHibernate Session data consistent?

I have NHibernate sessions cached in the ASP.NET session. I came across a situation where a user edited an object so it's in their first level cache in the ISession. Another user then edited the same object. At this point User1 still sees their original version of their edits where as User2 sees the correct state of the object? What i...

Update Image based on Response Stream

Is is possible to update an image on an HTML page using the response stream of an ASP.NET Generic Handler? For example, if I have the following code on a handler: // http://www.example.com/?Guid=&lt;AccountGuid&gt; public void ProcessRequest (HttpContext context) { context.Response.ContentType = "image/png"; context.Response.W...

Problem with asp.net C# focus, page_load

I'm really new to asp.net and have a couple of issues I'm trying to get fixed. I have some programming experience, but it is not asp.net. However, I've been able to follow the code enough to make other changes in the code to fix other issues. The first is this: I'm working with a form that has a calculate amount method that gets calle...

How to create multi-column data entry form using CSS in Asp.Net?

Hi- While converting a desktop application to a web app, I've run across my ignorance when attempting to implement a multi-column data entry form using CSS. I'm resolved to avoid using tables for this type of thing, and while I found a good reference to laying out a data entry form, I can find nothing that applies to multiple-column lay...

TabContainer Problems

Having a strange issue with the TabContainer in the AJAX Toolkit. We have several views into a customer record system that we have built as ASP.net controls. These controls use UpdatePanels to load data asynchronously. We use jQuery and jquery.ui to place these controls in separate tabs on a single page. Which all works swimmingly. ...

asp.net roles provider sample code

i want to implement asp.net role provider to assign users over my LAN to roles and have my asp.net intranet app implement security based on roles. i dont want to use VS to manage this witht he built in tools but rather hand this off to users to manage themselves. i want an admin folder with a few pages for admin roles to be able to crea...

Get "Invalid web service call, missing value for parameter" error when calling a web service method using jQuery

This is my aspx file code: var DTO = { "'productCategoryId'": "'10'" }; $.ajax({ type: "GET", url: "/WebService/DsmWebServices.asmx/GetProductSubCategory", data: DTO, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { window.alert("success"); }, error: function (msg) { } }); This is...

Ping in ASP.NET

I can ping using console app, but I want to ping from ASP.NET, the problem is that, ping object doesn't show ping.send(....). Is it not possible to ping from ASP.NET Web App? for image please visit : http://coscientech.blogspot.com/2010/09/ping-trouble-aspnet.html Directives are : using System; using System.Net; using System.Net.Networ...

How to get all Types using LINQ in Asp.net mvc

Hello Friends, I have this code viewModel.Messages = repository.GetAllMessages().OrderBy(x => x.MessageText); with this I am getting 75 messges and i am displaying all the Messages in the Grid with two columns MessageText and MessageType But I need to write a Linq Query to get all my Distinct MessageTypes from Messages? Can any ...

Asp.Net Routing to a generic handler

I Have a generic handler that's serving member logo images: http://site.com/logo.ashx?memberid=123 Now, I want to use it by caling a url like: http://site.com/logo/john.jpg So I would create a route for that (pattern: "logo/{username}.jpg"). But, my problem is - how do I retrieve {username} when inside ProcessRequest() of my generic...

Removing the theme from one ASP.NET page in a project.

We have a page that creates a printable version of the customer's bill. We are using themes via <pages styleSheetTheme="CityDesign">. This page is not using the Master page nor has any style sheet associated with it. I have added <%@ Page Language="C#" EnableTheming="false" Theme="" %> to the page and protected void Page_PreInit(object...

Good Strategy for sharing project dependencies/resources across multiple projects/boxes/developers?

Hi all, I work in a small developing team with 3 developers and none of us are really 'uber elite programmers' but we get by pretty well for our company. One thing that has been constantly recurring is we keep using the same resources in multiple projects. One example being the fckeditor control, however it stinks to constantly add this...

How can I build a recursive function that builds an MvcHtmlString Breadcrumb trail when I don't know the object beforehand?

I believe that I'm going to need to use an html helper method that uses lambda expressions to accomplish this. I was thinking of doing something along these lines: public static MvcHtmlString GetCategoryBreadCrumbs<T>( this HtmlHelper html, IEnumerable<T> currentCat, Func<T, T> parentProperty, Func<T...

how to make single sign on work with asp.net framework 4.0

Hi there, I have a parent web application and a child web application. I am using single sign on between them. The child application is supposed to redirect anonymous users to the login page of the parent application We just updated both to .net 4.0 framework and now the SSO doesn't work anymore. The setup is as follows. I have the...

Covered from html to aspx page, but the menus disappeared, why?

The Code Part </head> <body> <script src="/c/Currency.js" type="text/javascript" ></script> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" > </asp:ScriptManager> <div id="Content"> <div class="nobg"> <div id="Top"> <div class="left"> <a hr...

asp.net 4 get values from connection string

i have a sql connection string being stored in the web.config. how can i pull items liek server name, username, password... insode of c# asp.net code? ...

WebRequest and WebService call asynchronously in C#

I have MVC application (applies to non MVC as well) where a user is posting in data. I need to take this data, send it off to two seperate end points (one using a WebRequest form POST and one using a Web Service), parse the result, and send the result back to the original user. The issue at hand is that both end points take about 20-30...

ASP.Net 3.5 WebForms app - problems with images & subfolders in IIS 7.5

Hello - I recently moved my development to a Windows 7 machine, and am having all sorts of trouble getting basic things to work. I have a pretty run-of-the-mill Web Forms app that is in .Net 3.5. It is developed in VS 2008. Having moved it to my new dev machine, I can't get the site to serve up any images (that are in an images/ folder)...

asp.net and conection string item values

i have a SQL connection in my web.config. i know how to get it in my .net code but how do i pull out the actual values inside teh connection string like the username, password, and server name?!?!?!? ...