Guest User

Untitled

a guest
Aug 11th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. Server Error in '/' Application.
  2.  
  3. Access is denied
  4.  
  5. Exception Details: System.ComponentModel.Win32Exception: Access is denied
  6.  
  7. Source Error:
  8.  
  9.  
  10.  
  11. An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
  12.  
  13. [Win32Exception (0x80004005): Access is denied]
  14. System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +773
  15. System.Diagnostics.Process.Start() +123
  16. System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +49
  17. ksoftweb.Control.FTPAddEdit.ShowMessage(DataTable message, String title) +63
  18. ksoftweb.Control.FTPAddEdit.btnexnotpade_Click(Object sender, EventArgs e) +907
  19. System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +116
  20. System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +101
  21. System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
  22. System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
  23. System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9665050
  24. System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
  25.  
  26. {
  27. DataTable dtRecords = new DataTable();
  28. dtRecords.Columns.Add("Host", typeof(string));
  29. dtRecords.Columns.Add("Username", typeof(string));
  30. dtRecords.Columns.Add("Type", typeof(string));
  31. dtRecords.Columns.Add("ProjectName", typeof(string));
  32. dtRecords.Columns.Add("Url", typeof(string));
  33. dtRecords.Columns.Add("ClientName", typeof(string));
  34. dtRecords.Columns.Add("Notes", typeof(string));
  35. dtRecords.Columns.Add("Title", typeof(string));
  36. dtRecords.Columns.Add("Password", typeof(string));
  37.  
  38. object[] obj = { txt_host.Text, txt_userName.Text, drp_projectType.SelectedItem.Text, txtprogename.Text, txt_url.Text, txtclientName.Text, txt_notes.Text, txt_title.Text, txt_password.Text };
  39. dtRecords.Rows.Add(obj);
  40. ShowMessage(dtRecords, txt_notes.Text);
  41.  
  42.  
  43. }
  44.  
  45. public static void ShowMessage(DataTable message = null, string title = null)
  46. {
  47. Process notepad = Process.Start(new ProcessStartInfo("notepad.exe"));
  48. notepad.WaitForInputIdle();
  49.  
  50. if (!string.IsNullOrEmpty(title))
  51. SetWindowText(notepad.MainWindowHandle, title);
  52.  
  53. if (notepad != null)
  54. {
  55. if (message.Rows.Count > 0)
  56. {
  57. StringBuilder sb = new StringBuilder();
  58.  
  59.  
  60. sb.Append("Type : ");
  61.  
  62. sb.Append(message.Rows[0]["Type"].ToString());
  63. sb.Append(Environment.NewLine);
  64. sb.Append(Environment.NewLine);
  65.  
  66. sb.Append("ProjectName : ");
  67.  
  68. sb.Append(message.Rows[0]["ProjectName"].ToString());
  69. sb.Append(Environment.NewLine);
  70. sb.Append(Environment.NewLine);
  71.  
  72. sb.Append("Url : ");
  73.  
  74. sb.Append(message.Rows[0]["Url"].ToString());
  75. sb.Append(Environment.NewLine);
  76. sb.Append(Environment.NewLine);
  77.  
  78. sb.Append("Host : ");
  79.  
  80. sb.Append(message.Rows[0]["Host"].ToString());
  81. sb.Append(Environment.NewLine);
  82. sb.Append(Environment.NewLine);
  83.  
  84. sb.Append("Username : ");
  85.  
  86. sb.Append(message.Rows[0]["Username"].ToString());
  87. sb.Append(Environment.NewLine);
  88. sb.Append(Environment.NewLine);
  89.  
  90. sb.Append("Password : ");
  91.  
  92. sb.Append(message.Rows[0]["Password"].ToString());
  93. sb.Append(Environment.NewLine);
  94. sb.Append(Environment.NewLine);
  95.  
  96.  
  97.  
  98.  
  99. sb.Append("ClientName : ");
  100.  
  101. sb.Append(message.Rows[0]["ClientName"].ToString());
  102. sb.Append(Environment.NewLine);
  103. sb.Append(Environment.NewLine);
  104.  
  105. sb.Append("Notes : ");
  106.  
  107. sb.Append(message.Rows[0]["Notes"].ToString());
  108. sb.Append(Environment.NewLine);
  109. sb.Append(Environment.NewLine);
  110.  
  111. sb.Append("Title : ");
  112.  
  113. sb.Append(message.Rows[0]["Title"].ToString());
  114.  
  115.  
  116.  
  117.  
  118.  
  119. Literal lt = new Literal();
  120. lt.Text = sb.ToString();
  121.  
  122. IntPtr child = FindWindowEx(notepad.MainWindowHandle, new IntPtr(0), "Edit", null);
  123.  
  124. SendMessage(child, 0x000C, 0, lt.Text);
  125.  
  126. }
  127.  
  128. }
  129. }
  130.  
  131. using System.Web.UI.WebControls;
  132. using System.Data;
  133. using System.Text;
  134. using System.Runtime.InteropServices;
  135. using System.Diagnostics;
  136. using System.IO;
Add Comment
Please, Sign In to add comment