.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

Sharing Application-object in subdirectories

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net

I have a large constantly growing website, which I would like to re-organize into subdirectories. However, it seems that if I create a subdirectory and put some pages there, I'll loose the Application object. Obviously ASP.NET handles each subdirectory as a separate application. Is there a work around for this? Configuration option or something?

Any other suggestions how to organize the site?


View Complete Post

More Related Resource Links

Sharing IUnityContainer across application



We are considering to use unity container in fairly big application. Having learned ins and outs of unity I found most examples on microsoft site creates contains in a using clause such as

using(IUnityContainer container = new UnityContainer())



Ideally, we want to use "container" object across application not just one place. I would like to ask community here who have used unity in their applications how would you share "container" across projects in a solution. From the fact that "container" should be disposed as soon as you use it, if doing so would not make "container" available in the whole solution.

What pattern should be used to create container and disposing and make it available across solution?

Does keeping "container" alive for long time hit performance of the application?

Managing business object locks on application level

Today I worked out simple application side object locking solution for one server scenario. My motivation came from ASP.NET architecture forum thread How to solve concurrent site issue where one user asks for locking solution that works without changing database. Here is my simple and primitive solution that should help this guy out. I added also sample solution to this posting. My solution is simple: Create class for locked items. Create manager class that holds locks and manages them. Clear locks when session ends. Create page to release all locks. If you need something more serious then you should keep locks information in database or better than that - use some lock server. Also you may consider developing WCF service. LockItem class As a first thing let's create class that keeps lock information. I call this class as LockItem. This class doesn't hold references to locked objects - only type and ID as there are many business layers that doesn't use globally unique identifiers for objects. public class LockItem {     public Type ObjectType { get; set; }     public int ObjectId { get; set; }     public string SessionId { get; set; }     public DateTime LockedAt { get; set; } } LockItem class also contains property for session because otherwise it is not possible to kno

trust outlook 2003 application object when sending email c#

i am using outlook 2003 to send email but this outlook version always not trust application option so that before send email, always prompt a security dialog box to ask me to send email or not. how can i trust all outlook application object using vs 2008 or set in outlook 2003 anyone help

Casting transparent proxy of office application to the real object



1. I am using .net remoting to accept an office application (Excel,Word,PP)

2. the server is a simple office addin that supplies the application object

3. the remote object is application object wrapper (to enable MarshalByRefObject inheritance)

4. When the client gets the application object its type is Proxies.__TransparentProxy for all 3 applications

5. The problem is when trying to cast the transparent proxy to the real objects types

Microsoft.Office.Interop.PowerPoint.Application for PP

Microsoft.Office.Interop.Word.Application for Word

Microsoft.Office.Interop.Excel.Application for Excel

 the cast fails for Word  and PP whereas for Excel it works perfect

6. Since I also own the server code (the office addin) I can check what is the application

Executing SharePoint console application without sharing user credentials


I have a console application, which uses SharePoint object model to do some business operation, therefore it has been deployed on SharePoint server. Without sharing username/pwd, earlier we allow several users to access this console application by providing remote desktop file (.rdp) file. This .rdp file (ver5.1) contains username and encrypted password. With recent version 6.0 of .rdp, it still prompts for password. You may argue that it is due to security constraint.

What is the best approach to allow more users to run this console application without sharing user credentials, without modifying the console application.

Thanks in advance


J Justin


Silverlight Application using Sharepoint as a datasource using the Client Object Model



In my scenario i have a Silverlight application hosted in ASP.NET. I want to push/pull data from a sharepoint site using the Client Object Model. Is this possible?

Notice that i don't want my Silverlight app as a web part...it is hosted in asp.net and just uses Sharepoint 2010 as a data source. Will the Client Object Model work here or are sharepoint web services the only way out??. I can host both the SL app and the sharepoint site in the same domain if required...

Please advice





How to send any collection object from .NET Application to object variable created in SSIS Package


HI All,

I have a question regarding SSIS -- How to send list object from .NET Application to object variable created in SSIS Package. In List object there are one lack records stored..This list object needs to be passed to SSIS Package. Please reply me back with any suggestion/solutions ...Required ASAP.

Waiting for your replies.





Wpf Desktop Sharing Application for XP


Hi all,

I am about to create a WPF Desktop Sharing Application for Xp.  However, I would need to connect using internet and not in LAN.  Please help me on how to start and where to start. I have already have some links which connects through "RDPECOMM.dll" Via "RIAInivation"  on Vista and Windows 7. Any Idea on WPF with XP would be great.


Unable to cast Application state object


In global.asax:

-I have defined a struct (my_struct)

-I add a List of structs (List<my_struct>) to Application["MyList"]   

In default.aspx:

-I have defined the exact struct (my_struct) and want to cast the Application["MyList"] object to the List of structs.

example: x = (List<my_struct>)Application["MyList"];

I receive this error "Unable to cast object of type 'System.Collections.Generic.List`1[ASP.global_asax+my_struct]' to type 'System.Collections.Generic.List`1[_Default+my_struct]'

How to get Datagridcell object in a WPF application in .net 4.0

How do i get a datagridcell object for a WPF datagrid in code behind in .net4.0

Data transformation: Sharing object/variable scope between form and dialog (VS2010/VB)


I am writing a class to provide data transformation between two databases with different schema, and have a windows form which tries to do the data translation work, and a modal showDialog which pops up to halt and tweak the process when errors are detected.

The dialog needs to share, tweak, and pass control information to the main form to tweak the transform parameters until everything works OK.  My question is how to best achieve the data sharing since the dialog has separate data scope.  I have been using declarations like the folllowing to successfuly share data and avoid creating public variables:

     Friend importStatusMessage as string

But with all the variables the dialog needs to tweak, it's becoming messy.  Is there any way to declare the entire dialog as 'Friend' so that main form data is in scope to the dialog?  Or, maybe create an object with properties to pass the data, and share only the object?



Diff. b/w using object tag and application variable


What is the difference between using Static object collection (<object runat="server" scope="application" ID="MyInfo"   PROGID="MSWC.MYINFO">  </object> )  and using Apllivation variable (Application["Id"]=2;) to store application state. Are there any advantages and disadvantages in these two methods.

Flash Object from a Website in Window's application


I have a website which plays songs. I am trying to create a window’s application which will play the song played in the website. I am using WebBrowser class to execute the website as follows in the Window’s application’s button’s click event:


WebBrowser wb1 = new WebBrowser();

Wb1.Navigate("http://www.123.com ");

Here the problem is if the website uses flash objects (http://www.123.com/songs.swf ) to play songs, I am not able to play the song from the website in my window’s application. How do I do this? Any help please.

Microsoft's Collaborative Application Markup Language (CAML) Loop

discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:

Thinking about new C# method prototypes: object as dictionary

I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.

Integrating a Legacy Web Application in SharePoint

This month we will continue with the theme of deploying Microsoft's SharePoint as a company intranet by describing a method for integrating a legacy Web application inside a SharePoint site.

In many companies the intranet site is not just a home page with announcements. It houses Web applications used by many different departments. In last month's article, I built a page to search the employee table in Northwind (the sample database included in Microsoft's SQL Server). This month, I will move the Web pages used to add/remove records from the table into the SharePoint intranet.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.
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