Assorted links from others
http://www.codeproject.com/Articles/227382/Alert-Session-Time-out-in-ASP-Net
Assorted links from others
http://www.codeproject.com/Articles/227382/Alert-Session-Time-out-in-ASP-Net
If you need a command-line tool that you can include in your batch files to change the NTFS permissions of files or folders, you can use the following tool from Microsoft.
Download iCACLS : http://support.microsoft.com/kb/919240
Article from ss64: http://ss64.com/nt/icacls.html
For example, the command below gives
icacls c:\inetpub\wwwroot\files\ /grant mary:(M,WDAC)
NOTE: xcacls is DEPRECATED. Please use iCACLS instead which comes bundled with Microsoft Windows 2003.
Article: http://support.microsoft.com/kb/318754
Download tool here: http://www.microsoft.com/downloads/details.aspx?FamilyID=0ad33a24-0616-473c-b103-c35bc2820bda&DisplayLang=en
Other links:
Following the instructions below solved my problem :)
http://learn.iis.net/page.aspx/624/application-pool-identities/
I encountered the following error "The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' "
Found a working solution in one of the posts in this thread.
Here’s what I did:
<assemblies>tag
<add assembly="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
If all goes well, it should get rid of the error message just as it did for me :)
<assemblies>
<add assembly="WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Wordprocessing;
public void GenerateWord(){
WordprocessingDocument doc = WordprocessingDocument.Create(filename, WordprocessingDocumentType.Document);
MainDocumentPart mainPart = doc.AddMainDocumentPart();
mainPart.Document = new Document();
Body body = new Body();
/**** Create the contents ****/
DocumentFormat.OpenXml.Wordprocessing.Run run1, run2, run3, run4;
Paragraph para;
string text1 = "OpenXML Demo";
string text2 = "By Dora Chua";
string text3 = "Code modified from original at : ";
string text4 = "http://msdn.microsoft.com/en-us/library/bb448854.aspx";
string text5 = "Alex";
DocumentFormat.OpenXml.Wordprocessing.RunProperties runProperties1 = new DocumentFormat.OpenXml.Wordprocessing.RunProperties(new RunFonts() { Ascii = "Times New Roman" });
DocumentFormat.OpenXml.Wordprocessing.RunProperties runProperties2 = new DocumentFormat.OpenXml.Wordprocessing.RunProperties(new RunFonts() { Ascii = "Arial" });
DocumentFormat.OpenXml.Wordprocessing.RunProperties runProperties3 = new DocumentFormat.OpenXml.Wordprocessing.RunProperties(new RunFonts() { Ascii = "Script" });
DocumentFormat.OpenXml.Wordprocessing.RunProperties runProperties4 = new DocumentFormat.OpenXml.Wordprocessing.RunProperties(new RunFonts() { Ascii = "Courier New" });
DocumentFormat.OpenXml.Wordprocessing.RunProperties runProperties5 = new DocumentFormat.OpenXml.Wordprocessing.RunProperties(new RunFonts() { Ascii = "Courier New" });
DocumentFormat.OpenXml.Wordprocessing.FontSize fs1 = new DocumentFormat.OpenXml.Wordprocessing.FontSize();
DocumentFormat.OpenXml.Wordprocessing.Color c1 = new DocumentFormat.OpenXml.Wordprocessing.Color();
DocumentFormat.OpenXml.Wordprocessing.Bold b1 = new DocumentFormat.OpenXml.Wordprocessing.Bold();
DocumentFormat.OpenXml.Wordprocessing.FontSize fs2 = new DocumentFormat.OpenXml.Wordprocessing.FontSize();
DocumentFormat.OpenXml.Wordprocessing.Color c2 = new DocumentFormat.OpenXml.Wordprocessing.Color();
DocumentFormat.OpenXml.Wordprocessing.Bold b2 = new DocumentFormat.OpenXml.Wordprocessing.Bold();
DocumentFormat.OpenXml.Wordprocessing.FontSize fs3 = new DocumentFormat.OpenXml.Wordprocessing.FontSize();
DocumentFormat.OpenXml.Wordprocessing.Color c3 = new DocumentFormat.OpenXml.Wordprocessing.Color();
DocumentFormat.OpenXml.Wordprocessing.Bold b3 = new DocumentFormat.OpenXml.Wordprocessing.Bold();
DocumentFormat.OpenXml.Wordprocessing.FontSize fs4 = new DocumentFormat.OpenXml.Wordprocessing.FontSize();
DocumentFormat.OpenXml.Wordprocessing.Color c4 = new DocumentFormat.OpenXml.Wordprocessing.Color();
DocumentFormat.OpenXml.Wordprocessing.Bold b4 = new DocumentFormat.OpenXml.Wordprocessing.Bold();
DocumentFormat.OpenXml.Wordprocessing.FontSize fs5 = new DocumentFormat.OpenXml.Wordprocessing.FontSize();
DocumentFormat.OpenXml.Wordprocessing.Color c5 = new DocumentFormat.OpenXml.Wordprocessing.Color();
DocumentFormat.OpenXml.Wordprocessing.Bold b5 = new DocumentFormat.OpenXml.Wordprocessing.Bold();
/*** Format text1 ***/
run1 = new DocumentFormat.OpenXml.Wordprocessing.Run();
fs1.Val = "20";
c1.Val = "green";
b1.Val = true;
runProperties1.Append(fs1);
runProperties1.Append(c1);
runProperties1.Append(b1);
run1.Append(runProperties1);
run1.Append(new DocumentFormat.OpenXml.Wordprocessing.Text(text1));
para = new Paragraph(run1);
body.AppendChild(para);
/*** Format text2 ***/
run2 = new DocumentFormat.OpenXml.Wordprocessing.Run();
fs2.Val = "20";
c2.Val = "black";
b2.Val = false;
runProperties2.Append(fs2);
runProperties2.Append(c2);
runProperties2.Append(b2);
run2.Append(runProperties2);
run2.Append(new DocumentFormat.OpenXml.Wordprocessing.Text(text2));
para = new Paragraph(run2);
body.AppendChild(para);
/*** Format text3 and text4 as one paragraph ***/
run3 = new DocumentFormat.OpenXml.Wordprocessing.Run();
fs3.Val = "15";
c3.Val = "black";
b3.Val = false;
runProperties3.Append(fs3);
runProperties3.Append(c3);
runProperties3.Append(b3);
run3.Append(runProperties3);
run3.Append(new DocumentFormat.OpenXml.Wordprocessing.Text(text3));
fs4.Val = "15";
c4.Val = "red";
b4.Val = true;
runProperties4.Append(fs4);
runProperties4.Append(c4);
runProperties4.Append(b4);
run3.Append(runProperties4);
run3.Append(new DocumentFormat.OpenXml.Wordprocessing.Text(text4));
para = new Paragraph(run3);
body.AppendChild(para);
/*** Format the user-typed text ***/
fs5.Val = "30";
c5.Val = "blue";
b5.Val = false;
runProperties5.Append(fs5);
runProperties5.Append(c5);
runProperties5.Append(b5);
run4 = new DocumentFormat.OpenXml.Wordprocessing.Run();
run4.Append(runProperties5);
run4.Append(new DocumentFormat.OpenXml.Wordprocessing.Text(text5));
para = new Paragraph(run4);
body.AppendChild(para);
/*** Append the entire body ****/
mainPart.Document.Append(body);
/* Save the results and close */
mainPart.Document.Save();
doc.Close();
}//end GenerateWord
This is a very short code snippet which shows you how you can create a hyperlink using a QueryString or Form parameter received from a referring page.
Note that you would need to do two things in order for this to work:
Step 1
First, paste the code below in the HTML markup. The code below assumes that you are using a querystring parameter called “ID” that was passed over from a previous page.
<asp:HyperLink Target="_blank" ID="HyperLinkViewFeedback" runat="server"
NavigateURL='<%# String.Concat("~/Feedback/ViewFeedback.aspx?ID=",Request.QueryString["ID"]) %>'>View Feedback</asp:HyperLink>
Step 2
Add the “Page.DataBind()” method to the OnLoad of the code-behind file.
protected void Page_Load(object sender, EventArgs e)
{
Page.DataBind();
}
After that, you should see the hyperlink with the ID automatically appended as follows: