Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Server Error in '/' Application.
- Access is denied
- Exception Details: System.ComponentModel.Win32Exception: Access is denied
- Source Error:
- 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.
- [Win32Exception (0x80004005): Access is denied]
- System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +773
- System.Diagnostics.Process.Start() +123
- System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +49
- ksoftweb.Control.FTPAddEdit.ShowMessage(DataTable message, String title) +63
- ksoftweb.Control.FTPAddEdit.btnexnotpade_Click(Object sender, EventArgs e) +907
- System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +116
- System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +101
- System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
- System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
- System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9665050
- System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
- {
- DataTable dtRecords = new DataTable();
- dtRecords.Columns.Add("Host", typeof(string));
- dtRecords.Columns.Add("Username", typeof(string));
- dtRecords.Columns.Add("Type", typeof(string));
- dtRecords.Columns.Add("ProjectName", typeof(string));
- dtRecords.Columns.Add("Url", typeof(string));
- dtRecords.Columns.Add("ClientName", typeof(string));
- dtRecords.Columns.Add("Notes", typeof(string));
- dtRecords.Columns.Add("Title", typeof(string));
- dtRecords.Columns.Add("Password", typeof(string));
- 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 };
- dtRecords.Rows.Add(obj);
- ShowMessage(dtRecords, txt_notes.Text);
- }
- public static void ShowMessage(DataTable message = null, string title = null)
- {
- Process notepad = Process.Start(new ProcessStartInfo("notepad.exe"));
- notepad.WaitForInputIdle();
- if (!string.IsNullOrEmpty(title))
- SetWindowText(notepad.MainWindowHandle, title);
- if (notepad != null)
- {
- if (message.Rows.Count > 0)
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("Type : ");
- sb.Append(message.Rows[0]["Type"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("ProjectName : ");
- sb.Append(message.Rows[0]["ProjectName"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("Url : ");
- sb.Append(message.Rows[0]["Url"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("Host : ");
- sb.Append(message.Rows[0]["Host"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("Username : ");
- sb.Append(message.Rows[0]["Username"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("Password : ");
- sb.Append(message.Rows[0]["Password"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("ClientName : ");
- sb.Append(message.Rows[0]["ClientName"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("Notes : ");
- sb.Append(message.Rows[0]["Notes"].ToString());
- sb.Append(Environment.NewLine);
- sb.Append(Environment.NewLine);
- sb.Append("Title : ");
- sb.Append(message.Rows[0]["Title"].ToString());
- Literal lt = new Literal();
- lt.Text = sb.ToString();
- IntPtr child = FindWindowEx(notepad.MainWindowHandle, new IntPtr(0), "Edit", null);
- SendMessage(child, 0x000C, 0, lt.Text);
- }
- }
- }
- using System.Web.UI.WebControls;
- using System.Data;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Diagnostics;
- using System.IO;
Add Comment
Please, Sign In to add comment