.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

Created Package missing "[Content_Types].xml" file

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :.NET Framework

I am creating a package using "System.IO.Packaging.Package" class.

when does the  "[Content_Types].xml" gets added to the created package. I am missing the xml file in the generated package.

Also in my code I am not closing the package till the end of the application and the xml is missing if the application get crashed in between only. else it is there.


View Complete Post

More Related Resource Links

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

Missing tmpF7.tmp file

I am missing the tmpF7.tmp file that prohibits the uninstall of net programs. I tried finding the uninstaller recommended in an earlier post but the link no longer works. Basically I need to have the tmpF7.tmp file in order to install/uninstall .net software. Any suggestions greatly appreciated.

.Net Framework zip package file

Has anyone idea about .net package files?? I seriously have no clue about this & have asked to do a POC on this. I am told that this feature has come up along with .Net Framework 3.5 but couldn't find any pointer after googling even. It would be great if somebody can explain this & its usage??

Problems running a bat file within a SSIS package

I have a ssis package which has 2 tasks, first it builds an excel sheet with data on the server from where I am running the ssis pkg and the second task (a sql process task), runs a bat. the bat file that basically copies the  excel sheet created from the first step to another server. Problem is that the ssis pkg runs succesful when i run it from BIDS, bust when I run is as ajon, it gets hung. It completes the first step, it is the sescond step that is get hung. I noticed that when i run from BIDs, it does come up with a window open file - security warning and says the publisher could not be verified, are you sure you want to run this software. why does it do that ??? the file I am asking to run is a .bat file. it should automatically use the cmd.exe app to run the bat file. Please help !!!   Thanks in advance.

How to run Package (for WSP) without Building First; or, how to Relocate a .wsp file after it is cre

I'm attempting to automatically move the .wsp package to a separate deployment folder (like you could with WSPBuilder) after it has been created.  I can't just do a copy after a successful build (in build events) because a normal build does not cause the .wsp to be built.  Also, I've tried calling MSBuild directly in the build events and used the /t:Package call, however this automatically includes a rebuild of the assemblies, so this does not work.  Is there a way to call the /t:Package command but exclude an assembly build?  Any other ways to move around the .wsp file? Thanks.

snp file retains format of default printer from which it was created

This seems to be the case: MS Access 2000/2003 generates a snp report via VBA (Windows 2000/XP is the general environment for the enterprise).  The report is emailed to another individual.  When the recipient tries to print the report the print options apparently force the print job into the printer's override tray as "Print to Heavy Paper"; thereby causing the printer to wait for a user to place paper into the override tray (the printer is in use by a number of users). This anomaly does not happen with snp reports sent from other users, only from the two who are using one particular printer as their default printer.  As this relates to a remote customer, I have not so far requested the [affecting] sender users try using a different printer.  Either way it causes someone to perform extra steps -- Sender: if the printer selection was to be changed each time a snp report is created; Recipient: each time they need to print the particular report they need to go into printer options and override the Heavy Paper issue by selecting letter paper (and always be alert that the particular report came from the two particular sender users -- whereas once the recipient user sends the print job, it's too late; they need to run over to the printer to insert paper into the override tray to avoid a backlog of printer jobs). The site's IS team has bee

if ssis package writes to excel file that might be open by a user

I have written a package that writes to an excel file to a network folder. Eventually this package will run as a job. What is the best way to handle the situation where someone opens the file or inadvertantly leaving it open while the package is running and and stop the package.? No one needs to modify or write anything to this file after it is finished

delete a csv file created via StreamWriter?

I don't know if this is the correct forum.. but, is there a way I can automatically delete the following .csv file that was created via streamwriter (after it is viewed by an individual)?CODE (I would like to automatically delete the_filename.csv)://///////////////////////////////////////////////////////////////////////////////////////////////            string filename = "~/downloadfiles/data_complex987654321_filename.csv";             StreamWriter sw = new StreamWriter(HttpContext.Current.Server.MapPath(filename));             StringBuilder sb = new StringBuilder();            string filename = "~/the_filename.csv";            StreamWriter sw = new StreamWriter(HttpContext.Current.Server.MapPath(filename));            StringBuilder sb = new StringBuilder();

Edit CSS path on file that is dynamically created by ASP.NET

Hi,I'm not very familiar with .NET so bear with me. The website is question is built in ASP.NET and is using Themes.The external CSS link is outputted on the .master page dynamically by ASP.NET (so I've been told), apparently it generates this code from any CSS file located in /App_Themes/The problem is I need the link to the CSS to begin with a "/" so it points to the root directory.Currently the syntax is: <link href="App_Themes/file/file.css" type="text/css" rel="stylesheet" />And I need it to be <link href="/App_Themes/file/file.css" type="text/css" rel="stylesheet" />Is there anyway I can achieve this?Much thanks,Nick

Upgrade Solution using a .wsp file created from a site template

Hello, I'm creating a new site template that I will need to move from my development to production server. I have saved the template as a .wsp file and installed it on my staging server without any problems. However, I know once the site goes into production that changes will occur and I will need to upgrade the site template. I have tried to make changes to my development site and save a new site template, and then move to my staging server and upgrade the existing solution using the below PowerShell command, but I get an error that the GUIDS are different and the solution cannot be upgraded. Command: Update-SPUserSolution -Identity MyTemplate v1.wsp -Site http://webapplication/site  -ToSolution MyTemplate v2.wsp Error: Update-SPUserSolution : Given solution cannot be upgraded to the provided ToSolution because the solutions have different Guids. Does anyone know how I would upgrade the solution when using a site template as the bases for the solution? Thanks, wm5

Configuration file missing

I am trying to use app configuration file (I added App.config file to solution, reading it with ConfigurationManager), when I start the program from VS (in debug mode) everything is fine, but if I start it like a application (exe file) it can't find config file. The name are equeal (app.exe and app.exe.config). Anybody knows the solution? Thank you

SSIS package - change Web reference's addres from Configuration file?

Greetings. The SSIS packages provide very nice options to configure them from an XML file, which allows to change credentials, database names etc w/o editing the package. This lets me, say, transfer package from one server to another or from test to production w/o any hassle - just changing the xml. Problem is, i need to acces a web service in my package, and built-in SSIS web service task is useless and just SUCKS. It fails to work even with miscrosoft's own sharepoint web service. So, i have to use scripting task. And scripting task uses "web reference" to access web services, which in turn gives no way to change it's url.  So, if i want to test and then move to production, i'll have to edit my package to change the web reference url from "testserver:5123/mywebservice" to "productionserver:81/webservices/mywebservice". And then change it again to test it again. Etc. Is there a solution to this? A way to programmatically change web reference's url from inside scripting task?

The process could not be created for step 1 of job .....(reason: The system cannot find the file spe


Hi ,

I was trying your options by using "(operating system) cmdExec" to delete folders which were 15 days olders.  But here i am getting error if i look into view history of sql agent job... below is my command that i gave in Job step.

EXEC xp_cmdshell 'forfiles /p "z:\backup" -d 15 /c "cmd /c if @isDir==True echo RD /Q /S @FILE&RD /Q /S @FILE"'

And the error is :

The process could not be created for step 1 of job .....(reason: The system cannot find the file specified).  The Step failed.

but if i give this command in New Query Window, i am able to delete the folders successfully.

Please advice me if am wrong

R Anand

Dynamic Controls created missing after postback


While generating dynamic controls like , textboxes, dropdownlist, checkboxes and radiobuttons, after filling the textboxes and etc and submit and then postback occurs, the dynamic created controls missing. I try to find a way to make the controls persist for validation checking. Tried to use Viewstate to store the pnlTextBoxes and etc, but it has serializable error.  



protected void Page_Load(object sender, EventArgs e)
            pnlTextBoxes.Visible = false;
            pnlCheckBoxes.Visible = false;
            pnlRadioButtons.Visible = false;
            pnlDropDownList.Visible = false;
            pnlSubmitButton.Visible = false;
            pnlResults.Visible = false;


        protected void btnGenerateForm_Click(object sender, EventArgs e)

            if (tbTextBox.Text != String.Empty)

                if (Convert.ToInt32(tbTextBox.Text) > 0)
                    Label lblTextBox;
                    TextBox tbTextBox1;

                    for (int i = 0; i < Convert.ToInt32(tbTextBox.Text); i++)
                        lblTextBox = new Label();
                        lblTextBox.ID = "lbl" + i;
                        lblTextBox.Text = "TextBox" + i + ":&quo

.tmp file created after process crash when application upgraded to 2.0

After upgrading an asp.net application to 2.0 from 1.1 I am receiving a large 100+MB .tmp file in C:\Temp on the web server when the w3wp process serving that application crashes. If you open the file it looks like it is some sort of dump file. Any ideas how to turn this off. I know what is crashing the application and process. Any help is appreciated. Thanks

"Failed to save package file" error


I receive the following error while trying to create a new project in BIDS:

"Failed to save package file "C:\Users\<username>\Local Settings\Temp\2\tmpCAD.tmp" with error 0xC020207E "The file name is not valid.  The file name is a device or contains invalid characters"

Environment is:

Windows 2008 Server SP1 (64 bit)

Visual Studio Team System 2008

Any ideas?

File MPR.dll Missing

Where can i download that file?
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