.net

Not Save doc in GoogleDocs

Google.GData.Client.GDataRequestException: Execution of request failed: http://docs.google.com/feeds/documents/private/full ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized. ...

How do I enable users to send email from ASP.NET MVC?

I'm developing a web application in ASP.NET MVC, and I want users to be able to click on a new link and have it send an email through their default email client with information already filled in, how do I do this? How would I do it if I wanted an email to be sent out when a new ticket was submitted in the help system? ...

Why am I randomly getting a "There was no endpoint listening at" error?

I am using .NET to create a WCF and a website that calls it. About 5% of the time I get an error that says there was no endpoint listening. I don't know why it works most of the time but then sometimes it doesn't. Here is the code I am using, I am not sure if it is the way I am creating the WCF. I added a reference to the version of th...

Selfhosted WCF and SSL (Again)

Hello, I've configured ssl usign httpcfg set ssl, after this I've written next code: using System; using System.Net; using System.Security.Cryptography.X509Certificates; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Security; namespace SelfHost { internal class Program { pr...

What is the best way to rollback a .net transaction?

This question is related to my question: http://stackoverflow.com/questions/3072986/sql-server-and-transactionscope-with-msdtc-sporadically-cant-get-connection I'm doing some transaction programming using the .net TransactionScope class. If I understand correctly, I can do some SQL operations within a transaction by wrapping the SQL ca...

Why does Socket.Select(...) take IList and not (also) IList<Socket>?

I'm implementing some networking code using the selector pattern in C# / .NET 3.5. However, I was surprised to find that the Select method takes nongeneric IList's rather than IList<Socket>'s. It says clearly in the help documentation though that a list of sockets is expected here and nothing else. Does anyone know why this is the case...

WCF - Message Based Security and SSL Accelerator

I'm using a WCF service currently that uses message-based security and is intended to be accessed over HTTP, rather than HTTPS. This has been tested and works a treat. On deploying to a machine that uses an SSL accelerator I am getting the following error. "An error occurred while receiving the HTTP response to http://.....svc. This ...

Can WaitHandle.WaitOne with ExitContext flag be used without ContextBoundObject class?

MSDN documentation suggests that there may be other ways of using ExitContext flag. See WaitHandle.WaitOne() What other ways are there to enter a non-default context outside of using a ContextBoundObject inherited class? (I can't use ContextBoundObject in my application) ...

C# - TabPage Color event

Hello, C# certainly isn't my strong suit so I appreciate all the generous folk sharing their knowledge. I'm working with a Windows Form and I've read up on events and have found some excellent help on how to modify a TabControl so I can have an OnDraw event that will add some coloring to the tabs. The color of each tab is based upon th...

How do I distribute C# apps to computers with an unknown version of .Net?

I wrote a small app that I need to distribute to 700+ computers, the problem being that the computers can be running any version of Windows (though most likely XP or better) with any version of .Net framework installed with internet connections all from OC3 to dialup. I considered bundling .Net with my application but the .net installer...

Read XML file using LinQ

Hi, This is my XML File. <?xml version="1.0" encoding="utf-8"?> <locstrings> <section name="section1"> <locstring ID="sectionID1"> <Name>SectionName1</Name> </locstring> </section> <section name="section2"> <locstring ID="sectionID2"> <Name>SectionName2</Name> </locstring> <locstring ID="Sec...

.net propertys Grid - How to loop items?

Hi, Simple question which I can't seem to find the answer on the web. How do you loop properties in the microsoft propertysgrid control. example code below is the direction I'm heading in.... AppSettings appSettings = new AppSettings(); OptionsPropertyGrid.SelectedObject = appSettings; foreach(var x in Option...

new document format for word interop add-in

I'm having some trouble with a word add-in. I'm attempting to create a new document format, and have it sort-of working. The format is just an encoding on top of an existing docx. In other words, I can strip off the encoding and be left with a valid word document. Saving: Right now, when the user wants to save a document in the new f...

I need Expression Builder component

Hi, I need an Expression Builder component (Windows Forms) for adding it to my application like the SSIS (SQL Server Integration Services) expression builder control, kindly any link for free project, or component from third party company Thanks in advance ...

Scaling a Control's Font in C# .Net

We all know that the Control base class has a Scale method. The problem is this: it's absolute crap. While it admirably scales all of the controls, it does not scale the fonts. So all my my labels, text boxes, and buttons look so very awkward. It would be so simple to just loops through all of the form's controls and change the font,...

VB.NET concatenation problem

I have this line of code which I want to concatenate -or at least solve the loop problem... test = 1 - ("0." & thisnumber(0) & thisnumber(1) & thisnumber(2)) I want this to have a loop in it... -Increasing thisnumber() Until it gets to about 500, Can some implement a loop into this? Or suggest a way... Thanks a lot.. James :) ...

Subsonic updates multiple rows instead of 1 ????

Subsonic 3.0 is updating multiple rows instead of just the one it's supposed to DB Table is defined as follows - Col1 int NOT NULL Col2 Text NOT NULL Col3 INT NOT NULL ColX NTEXT COLY NTEXT Primary Key = Col1 + Col2 + Col3 .... the select expr is as follows myTable a = myTable.SingleOrDefault( x => x.Col1 = 1 && x.Col2 = 'a...

Self-tracking entities template missing

When i create an entity data model and select Add Code Generation Item i don't see any ADO.NET Self-Tracking Entity Generator(i only see ADO.NET EntityObject Generator). What may be the problem? I am using visual studio 2010 ultimate. I installed and then uninstalled ado.net entity framework ctp 3. ...

VB .Net concatination/loop problem...

I have this line of code which I want to concatenate -or at least solve the loop problem... test = 1 - ("0." & thisnumber(0) & thisnumber(1) & thisnumber(2) & thisnumber(3) ... thisnumber(500) ) I want this to have a loop in it... I simply want to get all the array values into 1 variable sort of thing, -as it is too long for a decima...

reducing the size of the selection box around a winforms custom control

I have a custom control based on the label control. My question is how do I change the selection box size around this custom control when a user selects it while in design mode. The need is the box is too large I need to make it smaller. Also AutoSize set to true will not work in my case, the selection box is still too big. ...