I've created a self-signed cert for testing encryption between my web application and the SQL Server.
When attempting to query the database using "Encrypt=Yes;" in the connection string, I receive the following message:
A connection was successfully established with the server, but then an error occurred during the pre-login handsha...
We have a complex client-server application that is developed using .NET Framework and uses SQL Server 2005. We use LinqToSql but we manage the life time of all the connections and we pass open connections to any DataContext that gets created. We've also used Microsoft WF in this product. WF makes its own connections to persist workflow...
Here is what I did :
1. I create a C# project from VS .NET 2005 (Console application)
2. Attached the library from tweetsharp.com
3. I copied and pasted and tried to run
The code
//setting up a request is unchanged
var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs(user, password)
.Statuses().OnHomeTimeline().AsXml()...
Does anyone know if there's a native port of HTML Tidy available for .NET? In Sourceforge, there's a TidyNet project - which hasn't been updated since 2005 and seems like a wrapper only. Java port seems to exist as recent JTidy project.
HTML Tidy project page:
http://tidy.sourceforge.net/
...
I have a piece of code that looks like this:
public static T CreateSomething<T>(SomeType a) where T : SomeMicrosoftBaseClass, new()
{
var newElement = new T { SomeProperty = a};
DoStuff();
return newElement;
}
and now I need to change the code so I could pass to the constructor of SomeMicrosoftBaseClass a boolean argument ...
Say I have the following code (context narrowed down as to keep the question scope limited)
public static IEnumerable<Color> GetThemColors(){
var ids = GetThePrimaryIds();
foreach (int id in ids){
yield return GetColorById(id);
}
ids = GetTheOtherIds();
foreach (int id in ids){
yield return GetOtherColorsById(id);
}
}
I woul...
I used Linq to insert objects into database.But if i used threads to simultanously create 20 object within 1 second, then system will fail to add 20 objects into database.
And I found it is not because of the sql server 's limit. so the only possible is Linq, any one have idea ? How can I create 20 records or more in 1 second within 1 s...
I am trying to sign an XML file in C# .NET 3.5 with a private RSA Key generated by OpenSSL.
Here is how I proceeded: I converted the RSA key from PEM format to XML format using the chilkat framework (www.example-code.com/csharp/cert_usePrivateKeyFromPEM.asp)
With my XML key, I am now able to use native .NET Functions, which I prefer. S...
How do I create a function which accepts a variable argument list in C++/CLI? I am looking to create a function which forwards most of it's arguments to String::Format.
...
Hello there..
I've started working on a project. I would like to store this project using subversion. I've installed VisualSVN server and TortoiseSVN.
This project consist of several little projects. Some of them I need everytime, some of them not. The questions are:
Should I store the whole project in one subversion project directo...
I find that when Im building a lot of webservices I tend to create thousands of small "testprograms" whos only purpose is to test the webservice. Yes, if your webservice only takes integers and strings you can use the built in testpage that the webservice serves up, but often you have booleans, userobjects or strongly typed datasets that...
I'm trying to get elements to render outside the bounds of their parent panel, in this case I'm using a stack panel.
<StackPanel ClipToBounds="False" Width="200" Orientation="Horizontal" Height="50"
Background="{DynamicResource TierBackground}">
<Rectangle ClipToBounds="False" VerticalAlignment="Bottom" Width="25" Height...
I'm trying to get an image to float unstreched in the middle of my TabControl.
I started with the below XAML which stretches the image.
<TabControl>
<TabControl.Background>
<ImageBrush ImageSource="/LogoTest;component/logo_final.png" />
</TabControl.Background>
</TabControl>
I've tried various approaches ...
Hi all,
If I render the following:
<Grid>
<Canvas SnapsToDevicePixels="True">
<Path Fill="#FF000000" SnapsToDevicePixels="True" Data="M 0.00,0.00 L 2.50,0.00 0.00,10.00 " />
<Path Fill="#FF260014" SnapsToDevicePixels="True" Data="M 2.50,0.00 L 7.50,0.00 2.50,10.00 0.00,10.00 " />
<Canvas.RenderTransform>
<ScaleTransform Scale...
If you have errors in VS2008, is there a FixComponent you can drag on the stage that solves the problems?
...
Is there a library for sending trackbacks or pingbacks in .Net? I know the code is not that hard to write, but if someone wrote, debugged it and maintains it, I'd rather re-use.
...
Say I have following the following snippet (context narrowed down to limit scope of question)
int? nullableId = GetNonNullableInts().FirstOrDefault();
Because GetNonNullableInts() returns ints, the FirstOrDefault will default to 0.
Is there a way to make the FirstOrDefault on a list of ints return a null value when the list is empty?
...
I am developing a Windows service that exposes a WCF service intended to be consumed by a Silverlight application, as explained in this blog post: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/03/27/10291.aspx
The problem I am facing is that I need to use the WebInvoke attribute, which is defined in the System....
I have a resource assembly with translated texts in various languages. Project kind of looks like this:
FooBar.resx
FooBar.nb-NO.resx
FooBar.sv-SE.resx
...
I can get the texts using static properties like this:
var value = FooBar.Hello;
Or by using reflection like this:
var value = resourceAssembly
.GetType("Namespace.FooBa...
For instance, let's say I have the DateTime format-string in a string variable, is there any syntax or method in .NET that would let me do the equivalent of this invalid code:
String line = String.Format("{0:{1}}", DateTime.Now, dateTimeFormat);
^^^ ^
...