.net-3.5

System.Diagnostics.Process.Start(“http://google.com”) crashes IE

蓝咒 提交于 2020-01-06 16:50:47
问题 Okay I'm having a brain fart here. This should be simple, but I'm missing something. I've got a win form and I'm trying to launch a web page when I click a button. The code for the button is here: private void button2_Click(object sender, EventArgs e) { try { System.Diagnostics.Process.Start("http://www.google.com"); } catch (Win32Exception ex) { Console.WriteLine(ex.Message); lblError.Text = ex.Message; } } When I run this on my computer, it works fine. On other computers, it only works if

Unable to decrypt claims cookie from .NET 4.5 to .NET 3.5

為{幸葍}努か 提交于 2020-01-06 12:54:11
问题 I have been trying to get the following scenario to work for around a week now with no luck. I have 2 applications, a .NET 4.5 application that is claims enabled, which is working perfectly well (works with other .NET 4 and up applications); and a legacy Intranet system built using WebForms .NET 3.5. The legacy application CANNOT be upgraded to a later version of .NET (would be so much easier). What I want to happen is that when I login on the .NET 4.5 application, I need to be authenticated

Load objects into cache from new thread

倖福魔咒の 提交于 2020-01-06 12:47:07
问题 I'm trying to use the BackgroundWorker class to start a new thread which loads a large number of objects into the cache when the website is started. My code so far: private void PreLoadCachedSearches() { var worker = new BackgroundWorker() { WorkerReportsProgress = false, WorkerSupportsCancellation = true }; worker.DoWork += new DoWorkEventHandler(DoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkerCompleted); worker.RunWorkerAsync(); } private static void DoWork

Error while running an installed Windows Service on dedicated Server

随声附和 提交于 2020-01-06 12:44:23
问题 Error while running an installed Windows Service on dedicated Server I installed my windows service on my virtual dedicated server using the exe file of my windows service. When I try to run my windows service from a virtual dedicated server then I get following error. Service cannot be started. System.InvalidOperationException: Could not find default endpoint element that references contract 'MyService.MyServSoap' in the ServiceModel client configuration section. This might be because no

How to create Application.exe.config in application directory

痞子三分冷 提交于 2020-01-06 09:04:33
问题 So I recently updated my application to support a new feature. In the past if the configuration file was deleted by the user it wasn't a big deal. This new feature requires it to exist, and one of the requirements is that, the file exists in the application's installation directory. I have notice when the file is deleted ( depending on variables I have not figured out ) I get a .NET notification that the configuration file is missing or corrupt. Currently my program then crashes ( I still

How to create Application.exe.config in application directory

[亡魂溺海] 提交于 2020-01-06 09:04:07
问题 So I recently updated my application to support a new feature. In the past if the configuration file was deleted by the user it wasn't a big deal. This new feature requires it to exist, and one of the requirements is that, the file exists in the application's installation directory. I have notice when the file is deleted ( depending on variables I have not figured out ) I get a .NET notification that the configuration file is missing or corrupt. Currently my program then crashes ( I still

Dealing with LINQ / HttpContext.Application & WebServices

醉酒当歌 提交于 2020-01-06 07:15:35
问题 I have the following function + code to parse and query a webservice request then in theory store the results in the application (as it only needs to refresh once a day, which luckily is when the application refreshes). //tocommondata is a reference to the common stuff in the webservice var dCountries = toCommonData.PropertyCountries; //KeyValuePair var dRegions = toCommonData.Regions;//Array var dAreas = toCommonData.Areas;//Array var commonDAT = (from c in dCountries join r in dRegions on c

Smooth movement of icon displayed on a Panel

↘锁芯ラ 提交于 2020-01-06 05:38:29
问题 I'm coding an app where I display a System.Drawing.Icon object on a System.Windows.Forms.Panel using a code that goes something like so: Graphics g = _panel.CreateGraphics(); g.DrawIcon(this.NodeIcon, _rectangle); I have code to move the icon around using drag-n-drop. My problem is that when the user move the icon around, it is anything but smooth. The icon looks distorted until the user stops moving the icon. I have tried to find information on this around the net but I can't get it to be

inserting null values in datetime column and integer column

感情迁移 提交于 2020-01-06 05:26:19
问题 I am using C# and developing a winform application. I have a project class which has the project attributes. the constructor of the project class is as follows: newProject = new Project(GCD_ID.IsNull() ? (int?)null : Convert.ToInt32(GCD_ID), txt_Proj_Desc.Text, txt_Prop_Name.Text, ST.ID.ToString().IsNull() ? null: ST.ID.ToString(), cmbCentre.Text, SEC.ID.ToString().IsNull() ? null : SEC.ID.ToString(), cmbZone.Text, FD.ID.ToString().IsNull() ? null : FD.ID.ToString(), DT.ID.ToString().IsNull()

Is there a workaround for ToolStrip to not leak memory

半腔热情 提交于 2020-01-06 04:47:23
问题 I have a simple form (MainForm) that opens another form (SubForm) which has a ToolStrip on it. There is nothing else on the called form. The calling form only has a button. The memory of the form that is called is never reclaimed because there is an eventhandler for SystemEvents.UserPreferenceChanged. I read that this is an issue that got fixed in .NET 3.5.1. [ EDIT The application runs on 3.5.1 so either it is not realy fixed or I do something different] Can I do something so that the GC can