Process start as different user - access is denied - c#

When I try to start a file using different user privilege on c# it's always failed on "access is denied".
SecureString password = new SecureString();
password.AppendChar('n');
password.AppendChar('o');
password.AppendChar('a');
password.AppendChar('m');
password.AppendChar('p');
Process process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.LoadUserProfile = true;
process.StartInfo.FileName = #"\\192.1.1.34\Noam\hanal.xlsx";
process.StartInfo.Domain = "dm";
process.StartInfo.UserName = "noamp";
process.StartInfo.Password = password;
process.StartInfo.Verb = "runas";
process.Start();
System.ComponentModel.Win32Exception
HResult=0x80004005
Message=Access is denied.
Source=System.Diagnostics.Process
StackTrace:
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at DelekLinkV2.DisplayFiles.listView_DoubleClick(Object sender, EventArgs e) in C:\Users\tomerz\Desktop\PROGRAM\DelekLinkV2\DelekLinkV2\DisplayFiles.cs:line 78
at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at DelekLinkV2.Program.Main(String[] args) in C:\Users\tomerz\Desktop\PROGRAM\DelekLinkV2\DelekLinkV2\Program.cs:line 58

Related

Method not found exception while consuming the Microsoft.SqlServer.Management.Common

I am using the following method to generate the script:
/// <summary>
/// Create single Table script with Data of specified DataBase and Table.
/// </summary>
/// <param name="dataBaseName">DataBase Name</param>
/// <param name="tableName">Table Name</param>
/// <param name="connectionString">Connection String</param>
public void CreateScriptTable(string dataBaseName, string tableName, string connectionString)
{
SqlConnection con = new SqlConnection(connectionString);
ServerConnection serverConnection = new ServerConnection(con);
Server server = new Server(serverConnection);
Database database = server.Databases["" + dataBaseName + ""];//Here exception coming
if (database != null)
{
Scripter scripter = new Scripter(server);
scripter.Options.ScriptData = true;
scripter.Options.ScriptSchema = true;
scripter.Options.ScriptDrops = false;
var sb = new StringBuilder();
foreach (Table table in database.Tables)
{
if (table.Name.ToLower() == tableName.ToLower())
{
sb.Append("DROP TABLE " + table.Name);
sb.Append(Environment.NewLine);
foreach (string s in scripter.EnumScript(new Urn[] { table.Urn }))
{
sb.Append(s);
sb.Append(Environment.NewLine);
}
string folder = "C:\\temp\\Scripts\\";
string filename = folder + tableName + ".sql";
System.IO.StreamWriter fs = System.IO.File.CreateText(filename);
fs.Write(sb);
fs.Close();
}
}
}
}
references added:
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using Microsoft.SqlServer.Management.Smo;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data.SqlClient;
using System.Text;
using System.Windows.Forms;
Exception:
Method not found: 'Microsoft.SqlServer.Management.Common.ServerConnection Microsoft.SqlServer.Management.Common.ServerConnection.GetDatabaseConnection(System.String)'.
at Microsoft.SqlServer.Management.Smo.Server.GetExecutionManager()
at Microsoft.SqlServer.Management.Smo.Server.get_ExecutionManager()
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.get_DatabaseEngineType()
at Microsoft.SqlServer.Management.Smo.DatabaseCollection.get_Item(String name)
at CreateBatchFile.Form1.CreateScriptTable(String dataBaseName, String tableName, String connectionString) in C:\Test Projects\CreateBatchFile\CreateBatchFile\Form1.cs:line 45
at CreateBatchFile.Form1.btnGenerateBatchFile_Click(Object sender, EventArgs e) in C:\Test Projects\CreateBatchFile\CreateBatchFile\Form1.cs:line 29
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CreateBatchFile.Program.Main() in C:\Test Projects\CreateBatchFile\CreateBatchFile\Program.cs:line 19
References in Solution Explorer:
Please let me know where I am moving in wrong direction.

Out Of Memory with Image.FromFile without stream

I have a code where I set the picturebox.image to the filePath below but when I run the program it throws a memory exeption. The image is a .jpg format. and as you can see in the code, I am not using a stream. Do I need to use I stream so that the exeption doesn't happen? If so then how do I use it?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
using System.Net;
using System.Web;
using System.Runtime.InteropServices;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public WebClient web;
public String html;
public Form1()
{
InitializeComponent();
List<string> plants = new List<string>();
web = new WebClient();
html = web.DownloadString("https://bonnieplants.com/how-to-grow/");
MatchCollection m1 = Regex.Matches(html, "(.+?)", RegexOptions.Singleline);
foreach(Match m in m1)
{
string plant = m.Groups[1].Value;
plants.Add(plant);
}
plants.Sort();
comboBox1.Items.AddRange(plants.ToArray());
}
private void button1_Click(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Uri imageUrl = new Uri("https://edge.bonnieplants.com/www/img/products/artichokes-400px-30.jpg");
string fileName = System.IO.Path.GetFileName(imageUrl.LocalPath);
fileName = fileName.Replace("-400px-30", "");
web.DownloadFileAsync(imageUrl, fileName);
string filePath = Application.StartupPath.ToString() + #"\" + fileName;
if(#"C:\Users\user\source\repos\WindowsFormsApp1\WindowsFormsApp1\bin\Debug\artichokes.jpg" == filePath)
{
Console.WriteLine(filePath);
}
pictureBox1.Image = Image.FromFile(Application.StartupPath.ToString() + #"\" + fileName);
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
and here is the exeption :
System.OutOfMemoryException
HResult=0x8007000E
Message=Out of memory.
Source=System.Drawing
StackTrace:
at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
at System.Drawing.Image.FromFile(String filename)
at WindowsFormsApp1.Form1.comboBox1_SelectedIndexChanged(Object sender, EventArgs e) in C:\Users\user\source\repos\WindowsFormsApp1\WindowsFormsApp1\Form1.cs:line 56
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsFormsApp1.Program.Main() in C:\Users\user\source\repos\WindowsFormsApp1\WindowsFormsApp1\Program.cs:line 19
UPDATE:
I figured out that the actual image is not formatted correctly and does not open in the file explorer. Does anybody know why?
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
web.DownloadFileAsync(imageUrl, fileName); downloads in the background, so you have to wait for it to finish before trying to open the picture. You can subscribe to the OnDownloadFileCompleted event to know when the download is finished.
An alternative is just to replace with a synchronous download:
web.DownloadFile(imageUrl, fileName);
However, if you execute that from the main thread, you will freeze the UI while the picture is downloading. So, use with care.

Programmatically create a restore point

I checked around and even utilized/tweaked several solutions including the following, but I keep getting one of two errors. I either get
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80070422)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)
at Check_In_Tool.checkInForm.CreateRestorePoint() in C:\Users\Greg\Source\Repos\Check In Tool\Check In Tool\Check In Tool\Form1.cs:line 268
at Check_In_Tool.checkInForm.button1_Click(Object sender, EventArgs e) in C:\Users\Greg\Source\Repos\Check In Tool\Check In Tool\Check In Tool\Form1.cs:line 64
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam))
or
The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
The code I am using currently is as follows:
try
{
// select local computer
ManagementScope ManScope = new ManagementScope("\\\\localhost\\root\\DEFAULT");
// create system restore point
ManagementPath ManPath = new ManagementPath("SystemRestore");
// select default options
ObjectGetOptions ManOptions = new ObjectGetOptions();
// create management class with previous options
ManagementClass ManClass = new ManagementClass(ManScope, ManPath, ManOptions);
// load function parameters
ManagementBaseObject ManBaseObject = ManClass.GetMethodParameters("CreateRestorePoint");
// description
ManBaseObject["Description"] = "Check-In Tool Restore Point";
// type of the restore point
ManBaseObject["RestorePointType"] = 0;
// type of the event
ManBaseObject["EventType"] = 100;
ManagementBaseObject OutParam = ManClass.InvokeMethod("CreateRestorePoint", ManBaseObject, null);
restLabel.Text = "Restore Point Set: Yes";
}
catch (ManagementException err)
{
restLabel.Text = "Restore Point Set: No - Error";
MessageBox.Show(err.Message);
}
Edit: I updated my code from err.Message to err.ToString() and got some new information. The issue, apparently, lies within this line of code:
ManagementBaseObject OutParam = ManClass.InvokeMethod("CreateRestorePoint", ManBaseObject, null);
Any ideas?

System.UnauthorizedAccess Exception: Access to the path c:\\ is denied

I am uploading and retrieving documents to and from the DB.Uploading works great
But retrieving is what is causing the error
Here's the code for retrieving
DataGridViewRow row = dataGridView1.CurrentRow;
int SelectedplantId = Convert.ToInt32(row.Cells["PId"].Value);
SQLiteConnection conn = new SQLiteConnection(connString);
conn.Open();
string qry = "select Otherdocuments from Plant where PId = #PId";
SQLiteCommand cmd = new SQLiteCommand(qry, conn);
cmd.Parameters.AddWithValue("#PId", SelectedpId);
byte[] buffer = (byte[])cmd.ExecuteScalar();
conn.Close();
//string filename = Application.StartupPath + "\\" + sFileName;
string SaveLocation = "C:" + "\\" + sFileName;
FileStream fs = null;
try
{
fs = new FileStream(SaveLocation,FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
}
finally
{
if (fs != null)
{
((IDisposable)fs).Dispose();
}
}
At fs = new FileStream(SaveLocation,FileMode.Create); is where this exception occurs.
Stack Trace
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at RVEST.frmPlant.btnRetrieveDocs_Click(Object sender, EventArgs e) in C:\D_Drive_Stuff\RVESTV2\RVEST\frmPlant.cs:line 169
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at RVEST.Program.Main() in C:\D_Drive_Stuff\RVESTV2\RVEST\Program.cs:line 26
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Thank you
Sun
The error message seems obvious, the App does not have permission to write in C:\ and probably not in Application.StartupPath either.
//string filename = Application.StartupPath + "\\" + sFileName;
//string SaveLocation = "C:" + "\\" + sFileName;
string SaveLocation = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sFileName);
There are a few other SpecialFolders that might be applicable.

How to read Exchange 2010 SP 1 public folder using c#

I am trying to read a public folder hosted in ExchangeServer 2010 SP1. Well I am able to connect but when I am trying to read the folder I am getting stragne error. Hope somebody will able to share his/her experience. Below is the code what I am executing doing and after that the error SoapException was Unhandled I am getting.
ExchangeServiceBinding serviceBinding = new ExchangeServiceBinding();
serviceBinding.Credentials = new NetworkCredential("XXXXXXXX", "YYYYYY", "zzzzzzzz");
serviceBinding.RequestServerVersionValue = new RequestServerVersion();
serviceBinding.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2010_SP1;
serviceBinding.Url = #"https://the.domain.of.my.work/EWS/exchange.asmx";
DistinguishedFolderIdType publicFolderRoot = new DistinguishedFolderIdType();
publicFolderRoot.Id = DistinguishedFolderIdNameType.publicfoldersroot;
FindFolder(serviceBinding, publicFolderRoot, #"All Public Folders");
private static FolderIdType FindFolder(ExchangeServiceBinding esb, BaseFolderIdType folderId, string folderName)
{
//FindPublicFolderType request = new FindPublicFolderType();
FindFolderType request = new FindFolderType();
request.Traversal = FolderQueryTraversalType.Shallow;
request.FolderShape = new FolderResponseShapeType();
request.FolderShape.BaseShape = DefaultShapeNamesType.AllProperties;
request.ParentFolderIds = new BaseFolderIdType[] { folderId };
//Giving error at this below
FindFolderResponseType response = esb.FindFolder(request);
foreach (ResponseMessageType rmt in response.ResponseMessages.Items)
{
if (rmt.ResponseClass == ResponseClassType.Success)
{
FindFolderResponseMessageType ffResponse = (FindFolderResponseMessageType)rmt;
if (ffResponse.RootFolder.TotalItemsInView > 0)
{
foreach (BaseFolderType subFolder in ffResponse.RootFolder.Folders)
if (subFolder.DisplayName == folderName)
return subFolder.FolderId;
return null;
}
Console.WriteLine("Can't find '" + folderName + "'.");
}
else
{
//Console.WriteLine("Response was: " + rmt.ResponseClass + Environment.NewLine + rmt.MessageText);
MessageBox.Show("Response was: " + rmt.ResponseClass + Environment.NewLine + rmt.MessageText);
}
}
return null;
}
After executing the above code I am facing error mentioned below
System.Web.Services.Protocols.SoapException
System.Web.Services.Protocols.SoapException
was unhandled Message="The mailbox
that was requested doesn't support the
specified RequestServerVersion."
Source="System.Web.Services"
Actor="" Lang="en-US" Node=""
Role="" StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream
responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at RnDExchangePublicFolder.ExchangeWebServices.ExchangeServiceBinding.FindFolder(FindFolderType
FindFolder1) in
E:\Data\VS2008\RnDExchangePublicFolder\RnDExchangePublicFolder\Web
References\ExchangeWebServices\Reference.cs:line
547
at RnDExchangePublicFolder.Form1.FindFolder(ExchangeServiceBinding
esb, BaseFolderIdType folderId, String
folderName) in
E:\Data\VS2008\RnDExchangePublicFolder\RnDExchangePublicFolder\Form1.cs:line
51
at RnDExchangePublicFolder.Form1.btnConnect_Click(Object
sender, EventArgs e) in
E:\Data\VS2008\RnDExchangePublicFolder\RnDExchangePublicFolder\Form1.cs:line
39
at System.Windows.Forms.Control.OnClick(EventArgs
e)
at System.Windows.Forms.Button.OnClick(EventArgs
e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs
mevent)
at System.Windows.Forms.Control.WmMouseUp(Message&
m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message&
m)
at System.Windows.Forms.ButtonBase.WndProc(Message&
m)
at System.Windows.Forms.Button.WndProc(Message&
m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr
lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32
pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form
mainForm)
at RnDExchangePublicFolder.Program.Main()
in
E:\Data\VS2008\RnDExchangePublicFolder\RnDExchangePublicFolder\Program.cs:line
18
at System.AppDomain._nExecuteAssembly(Assembly
assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String
assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback
callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Can somebody share their experience what is causing the issue or to further proceed.?
Thanks

Categories