.net

Can passport authentication be done in .net?

Can I do passport authentication in .net? ...

Any tips on debugging focus issues in WPF?

Specifically, I have a button that opens a nonmodal child window. Something in the main window steals the focus away from the child window as it opens. The fully general approach is to comment out parts of code until the problem goes away. I'm looking for faster methods. ...

Silverlight. Bind style items to datacontext.

I have button with custom style and i want to bind style items to button datacontext. How to do that? My tries: <UserControl.Resources> <Style x:Key="ButtonStyle1" TargetType="Button"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid> <TextBlock TextWrapping="Wrap" Te...

How to consume Windows Communication Foundation (WCF) by a Windows Service

When i create a Windows Service for getting information from a Web Application(ASP.NET c#) for scheduling some task in the client machine. To consume WCF from the web application. I added WCF reference to Window Service project as a service reference, everything seems fine. It updated app.config file, added service reference etc. it...

Problem loading assembly via Reflection and accessing configuration

I'm trying to load a .NET assembly with Reflection (using the Assembly.LoadFrom method), and instantiate some types within this assembly. This all seems to work fine, but one type I'm trying to instantiate accesses the assembly's configuration within its type initializer: it does ConfigurationManager.GetSection(sectionName). The assemb...

How do I implement a custom role provider which supports sub roles?

Are there any good guides on how to implement a custom role provider which has support for parent and child roles? I have a requirement to have high level Role permissions as per the usual Role provider functionality. However, I also have a requirement to further breakdown permissions into sub roles. I toyed with the idea of having fur...

Create Resource from asp.net page

Hi is it better to create one resource for every asp.net page application. or to create a global resource for all pages? my application has about 100 pages and 200 usercontrols. if i want to create global resource can how can i use this Feature of visual studio that able us to generate resource file automatically from every page with thi...

accessing two records simultanously from one table

i want to show comment & reply both as datalist itemtemplate .comment is shown there bt reply can,t accessed because two records of blogreply table come in one datalist item here they are related by BlogReplyToReplyID then how to make a qury for that i tried bt not get success ,plz help ...

Setting Boundfield.Datafield property to nested/linked table

Hi, I have a situation where I'd like to set a BoundField.DataField property to a nested table. The page is loading an nHibernate object (a HotSpot) which as a sub-object (a Link). The datasource for the grid in this case is the HotSpot object and I can bind to its properties without problem. However I need also to access some of the ...

DropDownList MVC C#

Hello all, I want to create a dropdownlist, but am struggling with how I display it. I have the following code. Controller var trader = new DisplayTradersAttachedToCategoryViewModel { Description = data.Description, Id = data.Id, BusinessName = traders.Select(x =...

Querying GPS location (only long. & lat.) from WM6 phone using .NET CF

Hello there, I am looking for a very simple solution of how to retrieve GPS data from WM6 cell phone. I am not looking for a GPS wrapper library (Google seems to find ONLY GPS libs...). I'd appreciate just a piece of code which does exactly this: start gps, retrieve long and lat, end gps. Nothing more. I guess with .NET Compact Framework...

TSQL command to call *.sql files

Hi, I have several *.sql files with script to create table and sprocs for a new database. Is there a way to create a TSQL script that could be run from the SQL Query Analyzer that would sequentially call the *.sql files? Example: call scrip 01; call scrip 02; call scrip 03; GO Sorry but I was not able to express my problem properly b...

Can you stop your PHP Code from being delivered to your Client just like JavaEE and .NET?

Hi Guys, Can you stop your PHP Code from being delivered to your Client just like JavaEE and .NET? As in JavaEE we can compile all our classes into .class extensions and all .jsp pages calling backend (business logic) beans can access those pages while no person can acccess or alter it. Similarly in .Net we can compile our whole ASP.n...

System.ArgumentNullException when adding AutoPostback to DropdownList

Hi, When I add AutoPostback = True to my DropDownList (with OnSelectedIndexChanged) I get a System.ArgumentNullException: Value cannot be null. My control looks like this: <asp:DropDownList ID="dropdown" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dropdown_OnSelectedIndexChanged" /> And code to fill control: dr...

Use $safeprojectname$ (Template Project) in msbuild targets

Hi, I have a VS2008 Template Project. This project has a script.targets (MSBUILD). I want that when I create new project from Template Project, I use $safeprojectname$ value in my targets file. is it possible ?? sample MSbuild targets <Project InitialTargets="Install" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; ...

How to use IDisposable to dispose an object.

I want to use IDisposable interface to clean any resource from the memory, that is not being used. public class dispose:IDisposable { public void Dispose() { throw new NotImplementedException(); } public void fun() { PizzaFactory _pz = new PizzaFactory(); // } ...

User security with .NET and mySQL

I feel like I'm kind of inventing the wheel all over but I haven't understood if I can use ASP.NET User Management with mySQL. Not sure if I want to either. I am designing a web site which requires user management. I use mySQL and .NET 4. Right now I've made a class Register which registers a user, but I am unsure how to protect the pas...

The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

I have developed a .NET 2.0 extension that acts as a plug in to a 3rd party application. Everything runs fine when run on anything but Citrix. When run over Citrix as a published application the extension crashes randomly which also crashes the 3rd party application. I have opened up a dump file and have found an exception message that...

Structure constructor in .net: any overhead?

About using structure constructors; are those two code blocks equal in performance? With constructor: Dim pt As Point For i As Integer = 1 To 1000 pt = New Point(i, i) Next No constructor: Dim pt As Point For i As Integer = 1 To 1000 pt.X = i pt.Y = i Next First one is shorter, especially if constructor would have m...

Surprising performance differences: List.Constains,SortedList.ContainsKey,DataRowCollection.Contains,DataTable.Select, DataTable.FindBy

Originally i wanted to ask for the fastest way to query a Datatable for a special row. I have tested 5 different methods for their performance with a surprising(for me) result. Background: I have created a View in a MS Sql-Server 2005 Database. This view has current a total count of 6318 rows. Because i must check very often if a given...