.net

Is it a good idea to run unit tests of a library as part of the MSI that installs it?

I have a system that has many components interacting with each other. It occured to me to run tests as part of the installation process to make sure it works correctly in the client machine. Does this sound like a reasonable idea? Have you seen it done? What framework would you use to run the tests? ...

Web service Bin folder

I created webservice which contain Add function as 'webmethod' when we want to deploy webservice we need to give web.config,app_data,app_code,.asmx file and Bin file in IIS right .But i am not able to see Bin folder in solution .Can any one tell me the reason why Bin folder is not coming ...

webservice deployment error in IIS

I created a sample webservice which contain default 'HelloWorld' function as 'webmethod' when tried to deploy webservice i gave web.config,app_data,app_code,.asmx file and Bin file in IIS .but i am getting this error Server Error in '/WebSite1' Application. Configuration Error Description: An error occurred during the processing of a...

two-way data binding within a FormView doesn't work when runat=server is used for the table row

I have an ObjectDataSource set up as follows: <asp:ObjectDataSource ID="AccountDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAccountByAccountID" TypeName="AccountBLL" InsertMethod="RegisterAccount" UpdateMethod="UpdateAccount"> <SelectParameters> <asp:QueryStringParameter Name=...

What instructional toy programs do you suggest writing to understand certificates?

I understand better some concepts when I write toy programs for isolated aspects of the problem at hand. For instance, for encryption you can write a program to encrypt and then decrypt a string.. and see that you get the initial string. What toy programs do you suggest that I write to understand certificates? (server/client interaction...

How to reference a generic type in the DataType attribute of a HierarchicalDataTemplate?

I have a class of MyClass<MyObject> and want to set it as the DataType for a HierarchicalDataTemplate. What is the syntax for this in XAML? (I know how to set namespaces, I need just the <HierarchicalDataTemplate DataType="{X:Type ..... syntax ...

asp.net mvc optional parameter

I am trying here to kinda merge 2 routes in 1 with asp.net mvc These routes are : http://www.example.com/e/1 and http://www.example.com/e/1,name-of-the-stuff Currently it is set as this in the Global.asax.cs : routes.MapRoute( "EventWithName", "e/{id},{name}", new { controller = "Event", action = "SingleEvent...

Zip And Unzip files and folders

I need to zip and unzip the directory hirarchy in Windows Mobile using C++/C#. What is the simplest library available for it? I have googled many times. I found some stuff, but I am not able to go ahead with it. If you have implemented or if you know some stuff about it please let me know. ...

How to achieve callbacks in WCF service?

I have to create a WCF service that handles following tasks: Register the notification sent from multiple client through WCF service. The WCF service in turn sends ( Callback) the notification to the multiple client. The WCF service also want to listen a datachange notification from another database server. Can a WCF service is trea...

loop all gridview rows on button click when paging enabled

ihv got allow paging in my gridview... i need this in button click event 1.) giridvew total row count . 2.) loop through all the rows in foreach but its jst wrking for the current gridview page...help protected void Button5_Click(object sender, EventArgs e) { int[] no = new int[GridView2.Rows.Count]; int...

Entify Framework Inserts require Select permissions

We use LINQ to Entities to write entries into an Audit database (SQL Server 2008). Since this is a dedicated Audit database, we only insert rows - we never read any rows, update or delete them from the auditing application. The auditing application should use the principle of Least Privilege, so we don't wish to grant it more permission...

Scripting .NET objects

Hi I have a simple .NET application which runs as Windows Service. Say it has one Class MyClass { Run(Destination d) Walk(Destination d) Wash(Dishes d) } I want to create a console application where I would type simple human readable commands like run left walk right Pretty much like you do in windows console. I wonder wh...

Invoking method from the System.__ComObject base type

I'm trying to get some information from an msi file I used: Type installerType = Type.GetTypeFromProgID("WindowsInstaller.Installer"); object installerInstance = installerType.CreateInstance(installerType); i'm well aware of the option to add reference to the file C:\windows\system32\msi.dll, and cast installerInstance to WindowsInst...

Optimal code - One large query but more complicated data retrieval or lots of small queries

Hi, I have a C# program that retrieves multiple rows from a DB but currently does them one at a time on the same connection. Would it be better to write it so that instead of repeatedly running (where blah changes each time): select data from table where name = 'blah' To something like: select name, data from table where name in (...

Using SortCompare event to sort datagridview integer-wise

I use the streamreader to fill a datagridview. I need to sort the datagridview integer-wise and have tried to use the SortCompare event. To compare the row values i use the function Public Function CompareIntegers(ByVal value1 As String, ByVal value2 As String) As Integer Dim int1 As Integer = Integer.Parse(value1) Dim int2 As I...

Is it possible to use the IDE debugger using the Monotouch evaluation version?

I have installed mono, the monotouch SDK and monodevelop. I have a sample project which I can set breakpoints on in the IDE. However I can't find any option to run my sample program so that the breakpoints are hit and I can step through the code. Is this functionality unavailable on the evaluation version, or am I missing something? ...

Where can I find the Microsoft .NET Framework Development Guide?

I'm positive that this guide existed, but my Google skills seem to be broken today. Could you show me the link to the MSDN pointing to that section? ...

IntPtr addition

So from what I can tell, every managed example of IntPtr addition I have found is WRONG. For example: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2006/10/16/10987.aspx My thought being, that if IntPtr is at (or near) int32.MaxValue on a 32-bit system, and you add an offset which overflows int32, isn't that still a valid memor...

How to compile a Website to use 32-bit Oracle Client on 64-bit Windows

I have received this error after updating to Windows 7 64-bit and then running an existing .NET Website. [InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.] I have only installed the ...

The as operator rejects the object even though the object appears to be of the correct type in the debugger.

The following code throws an exception. If there is no easy answer or stuff to check, I'll try to produce something that reproduces the error (though I don't know where to upload it). public static XMLobj Load(string FileName) { if (File.Exists(FileName) == false) { return null; } IRDnet.XMLobj def; XmlSerializer ...