.net

Why is DB an acronym and not abbreviation?

According to the .NET framework design guidelines, they say DB is an acronym and cased as such. But I thought it was an abbreviation of database? ...

Castle ActiveRecord error "Session is closed"

Hello, I'm trying to get started with Castle ActiveRecord but I'm stuck trying to make it work in an ASP.NET (MVC, if it matters) application. In fact I'm getting an ObjectDisposedException during a query with the following message: Session is closed! Object name: 'ISession'. I'm initializing ActiveRecord from an XML file (as shown i...

Is it possible to assign webpart id in onet.xml?

I've made a page with with three zones. In onet.xml I have defined three webparts which will be added to the page upon site creation. Is it possible to assign an id to each webpart in onet.xml, or do I need to write a feature receiver which hooks up the connections? My initial thought was to use on the page itself, but then I need the ...

Firefox ignores Response.ContentType

I have the following code that's essentially "proxying" a file from one server to another. It works perfectly in IE, but Firefox seems to ignore the Content-Type header and always transmits the files (MP3s) as text/html. It's not a major issue, but I'd like to get it working correctly in all browsers, so can anyone assist? Also, if ther...

Reload and Refresh Report Viewer based on New RDLC File

I have written a C# program using VS 2008 that uses the built in Report Viewer and processes reports locally. When the report is being viewed I want to replace the current rdlc file with a new one and refresh the report without closing the report form that contains the report viewer. I have already checked to make sure the file is bein...

Set focus on textbox in WPF

How to set the focus on an TextBox element in WPF I have this code: txtCompanyID.Focusable = true; txtCompanyID.Focus(); ...but it is not working. Any idea? ...

.net c# excel colomn autoFit

hi. i m working an excel object by c#. i want to autofit colunms. but like this: i want that columns width is 5 bigger than autofit mehod set. but how can i do this. how can i know width that autofit method set. ...

Fluent NHibernate table per hierarchy mapping problem

Hello, I'm using Fluent NHibernate version 1.0.0.579 (latest version at this date). I have an abstract Activity class and several inheriting classes, eg. DummyActivity. All of them use the same table Activities, and all of them have a discriminator value based on an integral type which points to a mapping in the project (not a FK in dat...

Column of BindingSource with Anonymous Class as DataSource

Is there any method to select a column of the current row of a BindingSource whose DataSource is an anonymous class? var userResults = from u in dataContext.Users join c in dataContext.Computers on u.ID equals c.UserID where doSearch && u.Name.Contains(userNameTextBox.Text) && u.UserName.Contains(userUsername...

WCF cross-domain policy security error

Hello everyone, I am using VSTS 2008 + C# + WCF + .Net 3.5 + Silverlight 3.0. I host Silverlight control in an html page and debug it from VSTS 2008 (press F5, then run in VSTS 2008 built-in ASP.Net development web server), then call another WCF service (hosted in another machine running IIS 7.0 + Vista). The WCF service is very simple,...

How to quickly (easy to script) preview 3D vectors / lines?

I am busy reading 3D building models from a tool and thus generating a bunch of Line(p1, p2) objects, each consisting of two Point(x, y, z) objects. I would like to display these things in a simple 3D viewer, kind of like SVG (which, as I understand, only supports 2D). The reading is done in Python, specifically IronPython. I could use ...

How do i connect to a SQL database from C#?

I am trying to write a local program management and install system for my home network, and i think i've got the technologies nailed down: C#/.NET/WPF for the client Lua for installation scripting support (through LuaInterface) SQL Server Express for maintaining a database of programs However i'm unsure what specifically i'll use to ...

Sync Framework custom providers to communicate over WCF

Hello, I'm using Microsoft Sync framework 1.0 (without ADO.NET services) I have created 2 custom providers: Xml provider and database provider. The code of both providers can be seen at: http://dl.getdropbox.com/u/204110/MyBaseSyncProvider.cs http://dl.getdropbox.com/u/204110/MyDbSyncProvider.cs http://dl.getdropbox.com/u/204110/My...

Why does the WPF Databinding not update after the collection is Filtered?

Why does my WPF ContextMenu databinding not update as expected when the collection is updated, however the ItemTemplate is displaying the context menu text correctly? Within the code below this works when I don't try update the ObservableCollection. When the underlying ObservableCollection is updated the DataTemplate updates without pr...

Send Message to Net (Similar to net send)

Hi all, Im not sure whether this topic have been disscussed or not, but i have no idea what to do. In c#, i need to send message to other people in my networks. I made some researches, and all pointing to socket methods. With this method, logically it will work like this: open up socket Encode the message(to ascii for example) Put the...

C# https connection issue

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 to develop a Silverlight 3 application and I need to access some https address on another web server (other than the server delivering the Silverlight application). Here is my code which works with .Net 3.5 console application, But I cannot find class like ServicePointManager when us...

Flex and .Net: what should I be concerned about to make my life easier?

I'm a Flash developer but have been slowly moving to developing my applications in Flex. The shift in paradigm has changed the way I work considerably. I am now following a more structured approach to development that has changed the kind of applications I am building. Now I'm relying more on a database and middleware to provide the co...

How to uninstall the .NET German Language Pack in Windows 7?

I’ve set up my computer with Windows 7 Ultimate German and Visual Studio 2008 English. Unfortunately I get now all messages of the .NET framework in German. This makes it difficult to search the web for error messages or to post a stack trace in an English forum. How can I uninstall the German Language Pack in Windows 7? The .NET Frame...

How will the client of a Web Service consuming a DoTNET vs JAVA wsdl differ?

How will the client of a Web Service consuming a DoTNET vs JAVA wsdl differ? Also, is it correct in stating that the dot NET WS invokes the constructor of the WS on each operation invocation whereas a JAVA WS has its constructor called only once when the application server starts up! ...

How to find out what plays "Ding" in my application

Whenever I close a particular context menu and have changed the value in a particular ToolStrip TextBox my application plays "Default Beep" (Windows Ding.wav) I have stepped through my code line by line until the "Ding" is heard but I cant find anything. How does one go about finding out what makes my application go "Ding"? Edit: Well...