.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Making Sense of ASP.NET Paths

Posted By: Amit Mehra     Posted Date: March 23, 2010    Points: 2   Category :ASP.Net
ASP.Net includes quite a plethora of properties to retrieve path information about the current request, control and application. There's a ton of information available about paths on the Request object, some of it appearing to overlap and some of it buried several levels down, and it can be confusing to find just the right path that you are looking for.

View Complete Post

More Related Resource Links

Time outs .....making sense of all options


I am running across some session time outs in infopath and on occassion timeouts with sharepoint in general.  So doing some research I have only confused myself more.  So I ask to help provide some light on how to mesh all the different configuration settings together.

SharePoint Farm environment info:  All servers are server 2008 x64 OS, IIS 7, MOSS 2007 x64 enteprise sp2 with august cu, sql server 2008 x64.  all have latest patches and updates.

so trying to mesh together timeouts in general with features, webparts, form services, reporting services, excel services and all other items that can/do timeout

  • so first was the allow large files by kb article (default iis connection time out is 120 seconds): 925083  http://support.microsoft.com/kb/925083
  • then some infopath timeouts that show invalid canary in the uls logs, one solution was change the iis asp session time out found here (default of 20 minutes):  http://technet.microsoft.com/en-us/library/cc725820(WS.10).aspx 
  • then in central administration under the web application general settings there is security validation time out is set to 30 minutes
  • then in central administration you can configure the sessio

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



Beginner: this doesn't make sense to me


Do you need and "empty" script tag in the head to run scripts that are in the body?  Also, can you run JQuery scripts if they're in the <head> tag?  The first sample only works if the JQuery script is in the form (and body) tag, not in the head - even if I add $(document).ready(function() { });

This works

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">
<form id="form1" runat="server">
<a href="">Here is a link</a>
<script type="text/javascript">
$('a').click(function () {
alert("you clicked me!");


This doesn't work.  Notice I removed the second <script> tag from the head

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="serve

Advanced Basics: A Match-Making Game in Visual Basic


My four-year-old son has decided that he wants to be like his dad when he grows up. He is planning to work in my office, and write computer programs just like I do. But there is one problem-he thinks I write games.

Duncan Mackenzie

MSDN Magazine October 2005

Say What?: Make Sense of Your Web Feedback using SQL Server 2005


By now, you're certainly collecting a variety of data from your Web site. But once you collect it, what do you do with it. For it to be meaningful, this data must be categorized and analyzed. The SQL Server 2005 data mining functionalities can help you get the most out of those reams of data you collect, as Peter Pyungchul Kim explains.

Peter Pyungchul Kim

MSDN Magazine June 2005

.NET Delegates: Making Asynchronous Method Calls in the .NET Environment


One of the many great features of the .NET Framework is that it has asynchronous infrastructure built in. In .NET you can call any method asynchronously by defining a delegate for the method and calling the delegate's asynchronous methods. This is beneficial to your application because when a synchronous call is made, the calling thread is blocked until the method completes whereas an asynchronous call is made on a different thread, and this allows the original thread to continue its work while the asynchronous call is in progress.This article explains delegates in .NET and how to use them to perform asynchronous calls, eliminating age-old threading problems.

Richard Grimes

MSDN Magazine August 2001

Making auto suggestions more appropriate for your textbox

To round out my coverage of Input Contexts we need to cover the concept of Input Classes. Put simply an input class is a hint to the Windows Mobile OS as to what kind of information should be entered into a text box (for example an email address, phone number, or person's name).

Selecting an Input Class for a textbox will change the source of data used for the auto suggestions provided by the OS as the user starts typing. For example in the screenshot above you can see the user is typing in a person's name yet the operating system is suggesting matching cellphone numbers.

Making textarea bold on IE7



I need to make the textarea content bold.

<b><textarea rows=2 cols=5>some text</textarea></b>

This works on IE6 browser but not on IE7.

Any ideas?




Wrong root, absolute paths '~' don't work.


Hi guys,

I have some kind of strange problem. I use Visual Studio 2008 Standard Edition, and whenever I use ~ in links (like PostBackUrl = "~/Admin/AddProduct.aspx"),  ~ is translated into "C:\DocumentAndSettings\User\Desktop" instead of my application root. Of course I dont have any project on Desktop. It happens in every project I run , even in project from pendrive which works properly on other computers.

How can i solve this problem ? What and where should i change ? I will be very thankful for any help.


Making Outgoing call Code

// class declaration /* * The dictionary is used here to cache all telephone sessions using * unique SIP as dictionary key. */ private Dictionary<string , IUccSession> callSessions = new Dictionary<string , IUccSession>(); ... // class code string remoteTelUri = "sip:14055550100@contoso.com;user=phone" ; protected IUccSession SessionOut = null ; // class object with protected access public void MakePhonecall(string remoteTelUri) { if (remoteTelUri == string .Empty) return ; //using session manager created in OnEnable callback function, create session and set session type to audio/video SessionOut = this .sm.CreateSession( UCC_SESSION_TYPE.UCCST_AUDIO_VIDEO, null ); //advise new session of session event handler (this) UCC_Advise<_IUccSessionEvents>( SessionOut, this ); //advise new session of session participant collection //event handler (this) UCC_Advise<_IUccSessionParticipantCollectionEvents>( SessionOut, this ); UccUriManager uriMgr = new UccUriManager(); UccUri uri = uriMgr.ParseUri(remoteTelUri); //create a session participant using the passed SIP uri IUccSessionParticipant p = SessionOut.CreateParticipant( uri, null ); IUccAudioVideoSessionParticipant avP = p as IUccAudioVideoSessionPartici

An exception occurred during the operation, making the result invalid

Hi I am using WCF services with WPF, both are .net 4 versions. I am calling asynchronously, During method calls, sometimes I get the following error Void RaiseExceptionIfNecessary()---An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() I tried alot to find the reason , but unable to find as it is unpredictable and inconsistent. Seeking for kind help from WCF guruzzz... Regards Zee

How to bind a WCF Http client to a specific outbound IPAddress before making the request

I want my request to go out through a specific IP Addresses. Is there a way to do that in WCF. The explanation of why I need this is a little long winded so i'd rather not get into that. Here is sample code string ipAddress = ""; IService service; ChannelFactory<IOmlService> factory = new ChannelFactory<IService>(new BasicHttpBinding(), new EndpointAddress("http://" + IPAddress + ":6996/IService")); service = factory.CreateChannel(); service.Test(); Here is an example scenario to explain exactly what i'm looking for. Let's say I have two IPs on my machine ( and Both of them can hit If i run this code now, it will hit the IP (.32) from any of my IPs (.30 or .31). How can i force it to go through a specific IP of mine (say .30). Is there any way to do that using WCF? Thanks

How to create an activity that allows multiple exit paths similar to FlowSwitch and FlowDecision

There have been several threads around this type of request but none have provided a definitive outcome for my requirements:I am looking to emulate the FlowSwitch or FlowDecision in a custom activity so as to simplify end user workflow authoring in a rehosted environment.Currenty I am limited to linking my custom activity to a FlowSwitch or FlowDecision to allow for simple logic to be visually composed. This creates additional complexity that I am trying to avoid.I understand that these are sealed types and even the abstract FlowNode base class of these types does not have any overridable types by design as WF 4.0 favours composition over inheritance.What options do I have to accomplish my objective?If activity composition is the response to my question then could I kindly request that some samples or links to samples are provided?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend