I know this is almost duplicate of : http://stackoverflow.com/questions/1269706/the-error-login-failed-for-user-nt-authority-iusr-in-asp-net-and-sql-server-2 and http://stackoverflow.com/questions/97594/login-failed-for-user-username-system-data-sqlclient-sqlexception-with-linq-i but some things don't add up compared to other appliations...
I used the function - WNetAddConnection2A(n, UserName, Password, dwFlags) to programmatically map a drive and read the drive info out, and then used WNetCancelConnection2A(DriveLetter, dwFlags, ForceDisconnect) to unmap the drive. The first map and unmap were fine. But the next map will bring me the error 1202 - ERROR_DEVICE_ALREADY_RE...
Using WinForms and C#:
I have a panel that contains a groupbox, some checkboxes, and textboxes. This panel is not always visible. Depending on user selections I show the panel. However, the screen is large enough that it requires scrollbars depending on your screen resolution.
Does anyone know why the panel would move based on the Aut...
In my current company, we have this decade old...let's call it a "Hello World" application.
While wanting to create a newer version of it, we also want to preserve older entries. These older entries contain hideous Word-generated HTML which was never filtered before.
If and when we move to a newer system, I'd prefer to have that HTML c...
Is it possible to check for a right-click on a menu item in .NET?
It appears that the framework doesn't expose it as an Event, but I've seen other applications (like Chrome and Firefox) which allow you to bring up a right-click context menu for a menu item. Presumably with a little event-loop magic you can do the same thing in .NET, ri...
I'm a Linq beginner so just looking for someone to let me know if following is possible to implement with Linq and if so some pointers how it could be achieved.
I want to transform one financial time series list into another where the second series list will be same length or shorter than the first list (usually it will be shorter, i.e....
Whenever an unhandled exception occurs on our site, I want to:
Send a notification email
Clear the user's session
Send the user to a error page ("Sorry, a problem occurred...")
The first and last I've had working for a long time but the second is causing me some issues. My Global.asax.vb includes:
Sub Application_Error(ByVal sender...
I have a piece of code, which outputs different results, depending on the C# compiler and the runtime.
The code in question is:
using System;
public class Program {
public static void Main() {
Console.WriteLine(string.Compare("alo\0alo\0", "alo\0alo\0\0", false, System.Globalization.CultureInfo.InvariantCulture));
}
}
...
The company I work for is currently developing a SEO tool which needs to include a domain or url Pagerank. It is possible to retrieve such data directly from Google by sending a request to the url called by the Google ToolBar. On of the parameters send to that url is a checksum of the domain whose pagerank is being requested. I have f...
I have a DataGridView that is bound to a DataTable. When a row in the table has an error (row.RowError is not empty), the DGV helpfully displays an error icon and tooltip with the error text. Instead of, or in addition to, this behavior, I would like to change the entire row color.
What event does the DGV subscribe to in order to handle...
Hi,
I am getting back again and again to it thinking about the best way to perform validation on POCO objects that need access to some context (ISession in NH, IRepository for example).
The only option I still can see is to use Service Locator, so my validation would look like:
public User : ICanValidate {
public User() {} // We n...
Hey All,
Im looking for thoughts/advice.
I have an upcoming project (all .net) that will require the following:
pulls data once a day from an online service provider based on certain criteria.
saves data locally for reference and reporting
the data thats pulled will be used to create gift cards. So after the data is loaded, a process ...
Example:
System.Web.Security.MembershipCollection implements IEnumerable and not IEnumberable<T>. Why doesn't it implement the latter, when it seems that it would be better (e.g. use LINQ)?
Or, is it not necessarily better?
...
This is likely a novice question about LINQ, but assuming I have a set of Items with a DateTime property, one date having at most one item, how would I go about selecting the N most recent items from a date of reference, that is, the N items which have a date smaller that the requested date, and the largest date?
My naive thought would b...
I have ~10,000 records would like to keep in a collection in memory and execute LINQ queries against it. This collection should be available for all the users in the application domain and can access concurrently. I’m looking for a .NET collection that supports multithreading can query asynchronously and efficiently without any threadin...
This is my xml result return from facebook
<fql_result_set list="true" xmlns="http://api.facebook.com/1.0/">
<comment>
<object_id>340982187784
</fql_result_set>
<fql_result_set list="true" xmlns="http://api.facebook.com/1.0/">
<fql_result_set_elt list="true">
<fql_result_set_elt_elt key="object_id">340982187784811202...
Hi,
Is there a way to implement the "CreateNode" method in my library abstract below? Or can this only be done in client code outside the library? I current get the error "Cannot create an instance of the abstract class or interface 'ToplogyLibrary.AbstractNode"
public abstract class AbstractTopology<T>
{
// Properties
publi...
Pretty much I have an Editable Combobox and I want to add a button to the right of the drop down button which clears the selected item. So...
|TextBox |X|v|
I was thinking something like...
<Style...>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ControlTemplate.Resources>
...
I've used Reflection.Emit in the past to write a compiler, but I know the standard compilers don't use it, and in an answer to another question here I saw a mention that there are some things Reflection.Emit is unable to do.
What are the limitations of Reflection.Emit that I should be aware of if I plan on writing another compiler for ....
I'm a .NET developer learning Java EE. These two concepts seem to serve the same exact purposes in either system.
So which framework gets credit for inventing them?
...