.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

Reg deployment of console application to customer

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :SharePoint
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

View Complete Post

More Related Resource Links

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

how run my C# console application when i start the computer ?

hi i have build a console application (any listener) and i need that when i open the computer - this application will run. i don't have installation for hem (it a simple little .exe file) is there any way to do it through my C# code ? thank's in advance

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?

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

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.

XCOPY deployment of WCF application produces random exceptions

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?

I get the "FilenotfoundExceptionunhandled" ? in Console application while displaying the SharePoint

Error Details: The Web application at http://dev001aaamaaind:333/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application. string urlSite = "http://dev001aaamaaind:333/";         using (SPSite sc = new SPSite(urlSite))//Getting Error in the line        {            SPWeb site = sc.RootWeb;            foreach (SPList list in site.Lists)            {                if (!list.Hidden)                    Console.WriteLine(list.Title);            }        }

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

Calling a Web Service Method Asynchronously does not work in Console Application

I have a web service that has a CreateReport method that generates a report based on the specified criteria. When I call this method Synchronously using a Windows Application or Console Application, the call works fine and the report is created. When I call this method ASynchronously (CreateReportASync) using Windows Application the report is created. When I call this method ASynchronously (CreateReportASync) using Console Application the web service does not even get the call.  I am using VS2005 and .Net Framework 2.0.  So the proxy is automatically created with the Async methods.  I am not really interested the result of the method call, so I do not add a Callback Delegate.  

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  

Running a WPF application from a console app and return status/console output from the wpf


I am trying to run a WPF application from a console application (e.g. a .bat file) but need to be able to receive console and error output from the WPF application.

I have console.writeline() and console.error.writeline commands in the WPF application but these are not received by the console application.

I would also like to receive a status value from the WPF on completion.

Is this possible?

If so could you give me a simple example using VB?

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?

A possible bug with redirecting RedirectStandardInput to console application from windows form (Win7


More info can be found on this post:



Basically when I attempt to redirect the standard input of a console application from windows form the console application crashes immediately.


When I use the exact same code from a console application everything works fine (this is what leads me to believe it might be a bug).


Here's the shortest code you need to reproduce the problem:


Process myProcess = new
myProcess.StartInfo.FileName = @"cmd.exe"
myProcess.StartInfo.UseShellExecute = false
myProcess.StartInfo.RedirectStandardInput = true


Please note the following:

1. When I change "cmd.exe" to "sort.exe" it works find on both console and windows form applications.

2. When compiling to windows application for 64 bit platform (or AnyCPU) the "myProcess.MainModule" throws an exception: {"Only part of a ReadProcessMemory or

WriteProcessMemory request was completed"}

3. Whe

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


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