I have a windows service that hosts a WCF service, and a webservice on a different machine acting as a client. I have the nettcpbinding set to Transport security using Windows authentication. Am I correct to assume that the windows user the webservice is running under must have permission to access the WCF service on the other machine?...
How to? I am using SerialPort.Write function and it looks like it works most of the time, but out of the blue it just stops working.
I also noticed that every time I send the command to print (even though I follow the manual, P with carriage return), I get string containing "ES" back - which according to the manual means error even thou...
When implementing IDisposable correctly, most implementations, including the framework guidelines, suggest including a private bool disposed; member in order to safely allow multiple calls to Dispose(), Dispose(bool) as well as to throw ObjectDisposedException when appropriate.
This works fine for a single class. However, when you subc...
We're currently attempting to implement a sql server 2008 udf to do expansion of shortened urls. We have it working quite well against most of the major url shortening services. However, at seemingly random times it will "hang" and refuse to work against a certain domain (for example bit.ly) while subsequent calls to other services...
So I'm working through the new scottgu wrox book, and I create a couple tables. Then (per the tutorial) I use linq to sql to build my Models, DataCOntext, Repository, etc. (It's pretty clear that LINQ to SQL seems to be "the Microsoft Way" to generate models and similar classes from schemas.)
Then I find I've neglected to include one of...
You can verify an XPath expression against an XML doc to verify it, but is there an easy way to verify the same XPath expression against the schema for that document?
Say I have an XSD schema like this:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... etc>
<xsd:element name="RootData">
<xsd:complexType>
<xsd:seq...
With a LINQ-TO-SQL linq query - does the SQL generated respect the 'Where conditions' order?
For instance:
int[] result = (from r in DB.Accounts
where r.AccountID > 10 && r.Name == "Harry").ToArray();
If there are thousands of rows, and there is an Index on the Name column, will the SQL query by the Indexed column fi...
I have files with tons of real time data that I process with an C# application. After processing the data it is presented in Excel using a specific template.
This is solved using Interop today. I must say I don't completely gasp the whole Interop situation. Do I have to manually install the Interop functionality on each end user termina...
What is the most suitable container just for strings holding in some array with non-predetermined upper boundary, which length is unknown on it's creation.
For simple code like:
Foo list = new Foo(); // size in unknown
for()/foreach()/do()/while() // any loop
{
list.Add(string);
}
Is it StringCollection as optimized Collection for ...
Is there anyone who knows a way to resize images on the .net 2.0 Compact Framework?
I want to be able to get images, taken with the camera on my phone, from the phones memory, resize them and then upload them to a webservice so I acctually don't need to store the resized images on disk.
...
I am trying to invoke an AJAX web service call from a client web site in the same machine[Win XP Home]. In doing so, I am getting the following error.
Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'Greetings' failed with the following error: <html>
<head>
<title>Not Found</title>
...
Let's say I have a Project table with a FK CompanyId which relates the project to a company Table.
In your Project model, do you add a Company object, or just the CompanyId property and retrieve the Company when needed in code?
...
I am working on a WCF application with a server and a client (naturally). In server project, I defined the classes with contract attributes.
Now when the server is ready, I added the service reference and it created the proxy for me. I used it and it did work fine.
The question I want to ask is, is it OK if I create a common DLL which ...
I need a path I could specify in log4net file appender so that the log files would go there.
However, aspnet or whatever account does not have write privileges to %APPDATA% folder.
Is there any place I can write to without asking customer admins to give extra access privileges?
Path.GetTempFile() is probably not a good idea. I need some...
I'm writing .NET On-the-Fly compiler for CLR scripting. And have a dilemma: is it better to throw an exception on build fail or not?
So what is the best-practice point of view, which approach is more suitable?
try
{
compiler.Compile(); // do not throws an exception only if build succeed
}
catch(CompilerException ex)
{
string err = ...
I need a UserControl to display pictures as a Gallery in Winforms. I have my pictures as a Image Collection but no problem to change to fit Control capabilities.
It could be nice if it is for .NET 1.1 but since I'm planning to migrate all our code to 2.0 if the control is in that framework it could be useful in the future
If it is fre...
Before rolling my own RSS parser, is there a really good open-source parser already written for C#?
...
Here's the situation, i want to have a user that can enter time on behalf of other (programmaticaly).
When i do QueueUpdateTimeSheet a web service of ms project server, it doesn't work if a try to enter time for an other.
I try the impersonification but i need to know the username and password of the person that i want to impersonate....
I'm working on an older .NET code base that has all the designer code stuffed into the same code file as my code (pre - partial classes).
Is there a mechanism to tell Visual Studio 2008 to go back and refactor designer code into a X.designer.cs partial class file?
...
Can NHibernate be used as ORM tool for MS Access?
We are using Nhibernate to access Sql Server, so wondering if it can be reused.
If it can be used how has the experience been?
...