.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

XCOPY deployment of WCF application produces random exceptions

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :WCF
We are using a simple self-developed XCOPY-like tool for copying the binaries etc. of a WCF application directly into the physical folder of a virtual directory on IIS. After the deployment the application randomly throws an excetion ("The ObjectContext instance has been disposed and can no longer be used for operations that require a connection"). I know that this is EF related (we are using EF for data access purposes within our WCF services) but donÄt think it has anything to do with EF.However, the exception occurs absolutely without any pattern. Starting our app multiple times results in the excetion sometimes but it succeeds immediately afterwards. I even restarted the IIS windows service but the same phenomenon still exists afterwards.When I use the "Publish" dialog from VS2008 for the deployment everything is fine. However, we need to do the deployment through our script as we have a staging location between our dev and prod environments.What do we have to to in order to make a successfull and reliable XCOPY deployment and get rid of this strange behaviour?

View Complete Post

More Related Resource Links

Problem with precompiling web application for deployment

Hi,I'm developing a web application consisting of several DLLs. I have no problem whatsoever compiling en building the application from within Visual Studio 2008 itself. But when I try to precompile the application (for deployment) from the VS command prompt, I get compilation errors.One of the errors is: "Could not load file or assembly 'wsCore' or one of its dependecies. The system cannot find the file specified".How can it be that VS2008 is perfectly capable of compiling the application from within the IDE and that same application can't be compiled from the command prompt?What am I missing here?

BUG: Exceptions propagation behaviour is different if the application is run inside visual studio.

I'm going crazy. I have a simple application: one form, one module. The project is configured to start from sub main. The module contains: Module Module1 Public Sub main() Try Application.Run(New Form1) Catch ex As Exception MessageBox.Show(ex.Message, "Fatal Error") End Try End Sub End Module Form1 contains one button and one event: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Throw New Exception("operation aborted") End Sub End Class I run the application inside visual studio... A new instance of Form1 is shown. I click the button. The exception is propagated to the sub main and the messagebox is shown. RIGHT!... I close visual studio (without recompiling anything) and I run the SAME .exe that was generated before... A new instance of Form1 is shown. I click the button. The exception IS NOT propagated to the main sub and a dialog appears: System.Exception: operation aborted in textexception.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Lino Barreca\Documenti\Visual Studio 2008\Projects\textexception\textexception\Form1.vb:riga 4 in System.Windows.Forms.Control.OnClick(EventArgs e) in System.Windows.Forms.Button.OnClick(EventArgs e) in System.Windows.Forms.ButtonBase.OnKeyUp(KeyEventArgs kevent)

Import Error: Could not process the file Documents/Application Deployment.mht as a Single File Web P

Hi there everyone, Version: Windows Sharepoint Services 3.0 with Cumulative Update June 29, 2010 applied. I am having issues importing an exported site into a different domain. I've overcome most of the issues and actually got most of the site to import, however, the import process get's stuck on import a Single File Web Page document from a document library. I believe the original cause of this error is http://support.microsoft.com/kb/980079 The issue I face now is, I already have a large number of .mht files in my document library which I do need to import into the test environment (or that I might need to restore in a DR scenario). Does anyone have any information on either: forcing the import commmand to "on error resume next" (ie. not stop processing when it encounters an error) fixing the already corrupt .mht files in the database easily The error text from the import command is: Error: Could not process the file Documents/Application Deployment.mht as a Single File Web Page document. at Microsoft.SharePoint.Library.SPRequest.CreateOrUpdateFileAndItem(String bstrUrl, String bstrWebRelativeUrl, Guid& docId, Object varDoc, Int32 docLength, Int32 exists, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Int32 iVersion, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String checkInComment, Int3

Reg deployment of console application to customer

Hi, First I have written code in class library file so that Title field should not allow duplicate values as follows using Microsoft.SharePoint;     public class UniqueIdEventHandler:SPItemEventReceiver     {         const string TITLE_QUERY = @"<Query><Where><Eq><FieldRef Name=""Title"" /><Value Type=""Text"">{0}</Value></Eq></Where></Query>";           public override void ItemAdding(SPItemEventProperties properties)         {             if (properties.AfterProperties["Title"] != null)             {                 //get the title of the new item                 string currentTitle = properties.AfterProperties["Title"].ToString();                 //get the web site object                 using (SPWeb

Reg deployment of console application to customer

Hi, First I have written code in class library file so that Title field should not allow duplicate values as follows using Microsoft.SharePoint;     public class UniqueIdEventHandler:SPItemEventReceiver     {         const string TITLE_QUERY = @"<Query><Where><Eq><FieldRef Name=""Title"" /><Value Type=""Text"">{0}</Value></Eq></Where></Query>";           public override void ItemAdding(SPItemEventProperties properties)         {             if (properties.AfterProperties["Title"] != null)             {                 //get the title of the new item                 string currentTitle = properties.AfterProperties["Title"].ToString();                 //get the web site object                 using (SPWeb

System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed is returning false sometimes

Hi,I have a WPF browser application. I am showing the current application version information whenever client click on a help button.for that i am writing the code as follows.void CreateAboutPopUp(object sender, EventArgs e)        {                        string StringVersion = "Info not available";                       if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)            {                System.Version Version = System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion;                if (Version != null)                    StringVersion = Version.ToString();             }                       string InfoString = "Version: " + StringVersion +  " ;            MessageBox.Show(App.Current.MainWindow, InfoString, "Passiar version information", MessageBoxButton.OK, MessageBoxImage.Information);                    }Works fine in Dev and Test servers and shows tthe vesrion information correctly.But in production server, the vesrion information is not showing up. its showing 'Version: Info not available '. Eventhough all manifest information is lates and available. and is also ClickOnce application.It is happening rarely.Please anybody can help me on this?Thanks in advance.Karuna.PS: My application is FullTrust and it is Checked as ClickOnce Application.

Third part plug-in deployment in web application?

I developed a Java Applet for asp.net c# web application, my question is : How should I deploy this Java Applet in my  msi file , I hope that one expert can give me detailed steps for how to put the java applet into msi file?Thanks.

Exploring Tablet PC Application Deployment

When developing Tablet PC-enabled applications you must take a number things into consideration. Do you create applications specific to just the Tablet PC platform? Do you create a single application that houses "standard" application inputs and then augments that functionality with tablet features where relevant? How do you know if you are running in a Tablet PC-enabled environment? What tools do you need to install to develop these applications? What do you need to do to deploy these applications into the enterprise? This article will address these issues.

The Tools

Visual Studio 2005 developers who want to develop pen-enabled applications don't have to do a lot more than they'd do to build any application with the .NET Framework

Web Application Deployment with Multiple Web Applications.

I have a website that I would like to deploy. In that website, there are a few class libraries, main web application, and other child web applications. so it's like this. lib1 lib2 main app sub app sub app ...   Each sub app's are separate project and each are virtual directory applications under the main application. I followed these two links below to teach myself and kind of got a idea that I have to create each Web Deployment Project for each web applications. MSDN site briefly talks about how I should use msbuild <ItemGroup> tag to merge the multiple applications together, but doesn't give me enough clue on which deployment project I should write this (prob. main?) or how I can translate the nested IIS structure, etc.  I read about msbuild but I still have no clue.  Each deployment projects deploy successfully without the nesting relationship though.  e.g. I can deploy mailApp.vbproj_deploy and subApp.vbproj_deploy separately and appears under IIS fine. But that's not what I really would like to do.. Could someone tell me how I could possibly achieve this?  Any help would be appreciated.    http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx http://msdn.microsoft.com/en-us/library/aa479568.aspx  

deployment of .Net framework based application




I want to make setup of .net framework based application in which following components must be included within setup file.


- .Net framework 2.0

- Windows Installer 3.1

- MDAC 2.8


I don't want to provide the link and let user manually download it and install it.

Setup should check whether this components are installed or not.

I tried Inno Setup maker but it requires internet to download .net framework then it installs.


My application is for india and internet is not widely spread in india till now.


Please help me ....

Application Page development: deployment of files


If I develop a 2010 Application page using VS2010 and an Empty Sharepoint Project to which I add an Application Page item, the aspx page  oes under the 14 hive \Layouts folder in a subfolder of my naming. The code behind goes into the resulting assembly which I choose to deploy to the GAC.

But say my aspx page has accompanying XSLT files - what is the correct location for those files?

Deployment of Windows Application


Hi Friends,

I have a windows application and i want to deploy it on the client side in such a way that i want to host the database on database server locally on the client side. And i want multiple users from multiple machines access the data through the application.

So my question is that should i keep the application and the database on the server together or should i install the application on separate computers and keep the database separate on the Database server.

Also, how can i allow the user to access this application in this scenario from the remote place say for example from another country.

Please give some suggestions on how to implement this.

Thanks ,


System.Deployment.Application.DeploymentDownloadException on PDB in XBAP



I am trying to include the pdb for an xbap application in VS 2010 and I am getting download errors when running my xbap.  I check the directory where the files are and the pdb file exists there.  Here is the error output:

 Windows    : 6.1.7600.0 (Win32NT)
 Common Language Runtime  : 4.0.30319.1
 System.Deployment.dll   : 4.0.30319.1 (RTMRel.030319-0100)
 clr.dll    : 4.0.30319.1 (RTMRel.030319-0100)
 dfdll.dll    : 4.0.30319.1 (RTMRel.030319-0100)
 dfshim.dll    : 4.0.31106.0 (Main.031106-0000)

 Deployment url   : http://localhost:10000/EEAdmin.xbap
 Application url   : http://localhost:10000/Application%20Files/EEAdmin_1_0_0_0/EEAdmin.exe.manifest

 Deployment Identity  : EEAdmin.xbap, Version=, Culture=neutral, PublicKeyToken=c79b6a703d3f35af, processorArchitecture=msil
 Application Identity  : EEAdmin.exe, Version=, Culture=neutral, PublicKeyToken=c79b6a703d3f35af, processorArchitecture=msil, type=win32


Application deployment - database connection issue


Hi, I finished an intranet application using webconfig to store my connection string to an Access database which has linked tables to SQL Server 2005.

Everything works perfectly, but when I publish the application on a IIS server service, it seems like all connections fail... :(


I looked up on internet but found nothing on this. I think my webconfig file is correct :


    <add key="dbconnect" value="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=//192.168.xxx.x/Websites/xxx/xxx.accdb;Persist Security Info=True"/>


Any idea why it happens?


thanks alot !

ASP.NET Web application deployment


I am just learning how to write a Web application. So forgive my primitive question. It is a steep learning curve to digest ASP.NET. Eventually I'd like to convert my desktop CAD (www.iNet1000.com) to a Web CAD...

In Visual Studio 2008 professional environment, I just created an ASP.NET application in C# (with one button which triggers server-side event processing to change the text of a label). It ran OK (Start without debugging). I suppose it ran using my ASP.NET Development Server included in VS2008. 

My question is - how do I deploy this ASP.NET application? I have an existing website (above).
How can I make this Web application available through my existing website? I suppose I have to ensure my provider supports IIS...

Thank you,




Error occurred in deployment step 'Recycle IIS Application Pool': Provider load failure



I am using Visual Studio 2010 to create page layouts and preview images(http://blog.beckybertram.com/Lists/Posts/Post.aspx?ID=71). I was successful in creating page layouts but the image was not coming properly.

So I decided to change the path of image and deploy the project (Empty SharePoint project). But this time, I am getting an error
Error occurred in deployment step 'Recycle IIS Application Pool': Provider load failure
I am sure there is no relation between changing image path in elements.xml and this error.

I also browsed through and found some related issues, but they are not specific to VS 2010 or SharePoint 2010. And I am apprehensive of implementing them.

1. The logged in user is site collection admin and local admin
2. Windows Management Instrumentation service is running
3. App pool's identity is configured to the local admin & password has not changed.

Thanks in advance

Vighnesh Bendre


Publishing new version of XBAP causes System.Deployment.Application.DeploymentException


Hello all, I'm currently developing a full trust XBAP. I'm hosting the published release version of the XBAP on my Windows Azure storage account. 

Recently, when I publish a new release version of the XBAP, some users receive a System.Deployment.Application.DeploymentException when trying to access the new version of the XBAP. The previous version of the XBAP worked on their computers no problem.

I did some research that suggest this exception may be caused if the version number of the XBAP is not incremented upon release. (I double checked, the release number IS automatically incremented). I also read I should use mage -cc to clear the cache before building and publishing. I tried both of these solutions to no avail.

If a user receives this error I can get the XBAP to run on their computer if I manually delete the appdata/Local/Apps/2.0/Data...  folder where the XBAP is cached. 

So my question is, how can publishing a new version of the XBAP (with a properly incremented version number) cause the XBAP to stop working on a computer where the previous version ran without error? What could cause the need to delete the appdata/Local/Apps/2.0/Data... folder where the XBAP is stored to fix the problem? And is there any way to ensure that this problem won't happen in the future?

Thanks for your help. The gory exception det

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