.net

.net webservices using complex types with other platforms e.g. Java

I'm working on a .net system that will both expose and consume web-services with another system to pass data back and forth - the other system is java based. Our proposed XSD contains complex types and some concern has been expressed about using complex types and how we'd be better sticking to simple types. I'd have thought .net would ...

Questions about IntPtr

Hi, When I make some P/Invoke or COM InterOP, I often bump into the IntPtr. So here is a couple of questions: Everyone said that IntPtr is a struct, so what's in it? I can only think of an 32bit/64bit integer which is the address it points to. Anything else? Where is the IntPtr located? If it is a struct, I believe it should be in the...

How to extracting the XML contents of an XDocument variable ?

I have the a full XML file in an XDocument variable which I get from some API like this using (var reader = XmlReader.Create("website")) { doc = XDocument.Load(reader); } I need to get the structure of the XML and navigate through its nodes, but through the XDocument variable, I only get the whole document ...

DataAdapter returns a empty rowset, but DataReader returns data.

Hi, I execute a query that calls a SP, that SP returns data... but when I call it with a DataAdapter I get no result data, if use a DataReader instead... then I get data. The database is SQL Server and the code is using OleDb for reasons I cannot change. These two calls returns diferent things: String commandText = "Declare @retur...

Get object extension from AccessibleObjectFromWindow ?

I managed to get the selected file in the current working folder from Windows Explorer using SystemAccessibleObject from http://mwinapi.sourceforge.net/ I want to get the filename with extension but if you enable "Hide extensions for known file types" then there will be only the filename. I'm stuck on this step. My code: SystemAccessi...

Set CMS content in .NET

What would be the best approach to set dynamic content from the database to controls in an aspx page? My database consists of pages (index.aspx, home.aspx and so on) which consists of controls (DivStart, LabelDescription, and so forth). The first technique that came to my mind was looping through all the controls in the page, looking f...

How to get current mouse cursor coordinate in C#?

How to get current mouse cursor coordinate in C#? ...

datagrid is larger than usercontrol

Hi, My Mainpage has a menu that loads usercontrols into a Stackpannel. I've got several usercontrols and some of them have a datagrid. But when I bind a large collection to the datagrid, the datagrid gets much larger than the usercontrol. How can I set the max width/height of the grid to the size of the usercontrol. It seems that the us...

How to prefix 'N' for the parameters in a store procedure for a unicode strings

How to prefix 'N' for the parameters in a store procedure for a unicode strings in c#, alternatively i am using the same procedure for the non unicode also. i need to append it only for the unicode ones kindly help. ...

usercontrol with colorbox not firing an event

I have a colorbox which shows a hidden div when a link is clicked. within the div being shown in the colorbox is a usercontrol. its basically a subscribe to newsletter form that adds them to our customer db. For some reason the button to submit the form will not work in the colorbox, but it will if i move it outside of the hidden div. Th...

Strategy for error handling in Web Services

We are working on a web application. All pages of this web application inherits from a base page, and we have a mechanism like this.Error += new EventHandler( Page_Error ); private void Page_Error( object sender, EventArgs e ) { Helper.LogError( this.Context ); } The above works pretty fine in all webpages. Now we...

Using .NET 1.1 libraries in .NET 4.0 applications

Are there any known stability issues when using .NET 1.1 libraries in a .NET 4.0 application? ...

If VTiger is in PHP, Which CRM is for Rails?

Hi, I come from a .NET background and just learned Ruby On Rails. My company uses VTiger for Customer Relationship Management. I have no idea about PHP. I am a rails fan, instead of me learning PHP to work on VTiger, I am looking for a solution in Rails. I found Fat Free CRM. Is it good? Also, Are their any better ones? ...

How to: P2P with Teredo/UDP

I am looking into P2P, without using server(to start with); I want to use UDP for clients talk to each other, without writing a server. For instance, to start with I'd provide the connecting IP/Port manually to the connecting peers. Is is possible to use UDP with Teredo(ipv6) transient protocol? Any links/pointers/etc much appreciated...

How to remove .NET Remoting Fatal problem :Exception

Hello, I am implementing Publisher/Subscriber pattern via .NET Remoting. My publisher is waiting for incoming requests on its url. At its side remoting environment configures properly and no problem at all. At subscriber's end when I make some subscriptions from its side to publisher, it hangs out. I mean program hangs and console sho...

How to Queue The Add Operation in NHibernate?

Hi guys, Is there some way to queue the "Add" operation in NHibernate, just like Linq to SQL and Entity Framework does? I want to add an entity to the repository, but I don't want to save it to the database immediately, because the business logic is complex. I want to submit all changes when I call ITransaction.Commit(), just like Ent...

Like operator in Expression Tree

I have a Linq extension method to dynamically filter Linq queries using string values. For example: query.WhereHelper("columName", ">", 1). I could use many different filter operators like GreaterThan or NotEqual etc. but not "Like". There is no Expression.Like or Expression.StartsWith etc. How can I implement Like operator to my Express...

Security object model .net

Hi, I am trying to build a simple username-password-role based security object model for my application. The requirement is that user will enter using username and password and he/she will have enable and disable access to the part of the system depending upon whatever role they fall into. which I think is fairly simple idea. Now here...

Generate sql server scripts using .net framework

Hi all, it is possible to generate script from sql server using .net framework. Example if I have database "Northwind". Then I wish to create/generate script insert" in form file extension .sql (ex: northwind_insert.sql). Is something like when you using sql-server "right-click on table" > "script table as" > "Insert to" > "file". I w...

Resources for developing .NET applications for Windows Vista/7?

I am looking for some resources for developing .NET apps for Windows Vista/7. What are the challenges? Are there resources on dealing with UAC? What about upgrading a large enterprise XP application? We have a large WinForms application written in C# with the .NET 2.0 framework. We are tasked with getting this application to run on Win...