« first day (13 days earlier)      last day (4939 days later) » 

1:37 AM
So I love when chat rooms get really busy like this ;) ... what's better is enjoying a Blue Moon and waiting on the chat's to get even busier ;)
 
 
4 hours later…
5:29 AM
Hello?
Anyone familiar with Automapper?
 
5:46 AM
Hello everyone.. I am using navigate2 method of internetExplorer class. My application is working fine in Windows XP however navigate2 method throw E_FAIL in windows 7. Can Anyone help me please?
any help/suggestion is appreciated.
 
6:19 AM
@malckier a bit late, but I use Automapper
ohh.. he's gone..
 
I'm adding a new object to a database through EF4. The object has associations in the EF model, but for this update, I just have the foreign key. How can I addObject without having EF attempt to cascade the insert? I don't want to attach each reference before addObject - that's stupid. And I think it requires more trips to the DB, no?
 
6:52 AM
@uosɐſ Aren't there properties for both the FK field and the object that it refers to on those classes?
 
7:10 AM
This new C# 5.0 stuff looks quite interresting
 
Is .net compact framework is dead? Whats NExt?
 
7:26 AM
Well, xna uses CF
 
How about Windows Mobile and CE Platforms? Mainly for handheld Scanners Applications...
 
 
3 hours later…
10:08 AM
hello everybody
anybody there
no one?! O.o
 
I'm here
 
@LasseVKarlsen hello my friend
i have a question
 
is that the question?
 
what is the best way to authenticate a user through network
@Frank really sorry
its because of my connection problem
you know, i have a SQL database with C# interface
i'm using SQL users for each user
but the problem is that i dont wanna let them copy my program
how can i notice if a user previously logged in with a specific username
and how can i control it
any idea?
 
10:26 AM
not entirely sure I understand what you mean here
 
@LasseVKarlsen you know, users may try to copy application files or install it in 2 or 3 computers
 
OK, and that's a problem?
 
exactly
 
How do they authenticate now?
 
with SQL users
 
10:30 AM
You mean integrated security? You use their machine logon identity?
 
no, just with the sql username and password
 
So you ask for the username and password?
 
not exactly, but i use this in connection string and once when i'm installing the project, i set that
next times, they should just enter their center password
i was thinking about saving MAC address in database
is it a good idea?
 
Probably not
I mean.....
Can't the customer just edit that table?
What exactly are you trying to prevent, and more importantly, why?
 
prevent them to copy and install the project in other PC's
 
10:35 AM
Are you the one installing the software?
 
currently, yes but maybe i let them install it
through network
 
So if you let them install it, how would the software know which PC's are good, and which are bad, to begin with?
 
you know, the thing is that, they should not be able to install more than one copy per center...
it doesn't matter on which PC they are installing the app
 
@DrTJ Why not?
 
i dont know... untill now, i had no idea about this
 
10:40 AM
Ok, just so I understand
The customer (or whowever, the "center" [I still don't know what this is]) is allowed to install the program once, doesn't matter which machine, but should not be allowed to move it afterwards
 
couse i said, let them connect to DB first time and i save the MAC address in DB
yes exactly, and each center = a customer
 
What if that machine is ruined?
What if the owner of that machine is on vacation?
 
@LasseVKarlsen i was thinking about this...
but, in each center, there are some public PCs
users maybe change
its not important, all can access the program
 
Ok, so back to my previous question
Why are you trying to prevent this?
 
about copying?! couse i'm trying to sell this per each copy
 
10:46 AM
so you want to charge the customer 2x if he wants to install it twice?
 
yes
 
ok
so if the customer pays 2x, how does the software knows he is allowed to install it twice?
 
this is my problem too, but it should be solved (i think) with a new SQL user
 
remember that the customer controls his database
if he as access to it, he can manipulate it
can't he just add another user himself for free?
 
no no... the database is in a server...
 
10:48 AM
where is the server?
 
in another PC so far away...
for some of them its in another City
 
ok, and once installed on their machine, they don't actually log on
they just start the program
 
you know, this is a automation system
 
and the connection string specifies who they are?
I don't know! That's the problem! You're not telling, you're giving me information in bits and pieces.
 
sorry, i thought u got me
this is an automation system. installing in several PCs in some cities
the database is installed in the central city
 
10:52 AM
OK
so, you create a SQL user on the server, you install the program on a PC, and in the connection string you specify that SQL user
is that correct?
 
yes
exactly
 
So you want to prevent me from copying the program + the connection string (file whatever) to a new machine, and start the program there too
And to do this, you want to store the MAC address of the first machine that user logs on from in the database, and then verify that afterwards
 
yes exactly
 
OK, and the user does not log on
The program "knows" who he is, by that SQL user in the connection string
 
yes
 
10:54 AM
OK, what I would do additionally is the give each user a number of "moves", before they have to call you
so for instance you could allow the user to move to a new machine a couple of times within a 6 month period, or a year
To handle new computers, etc.
so in addition to the MAC address I would store a counter, starting at 0 when first run
and if the user connects from a new machine, they have copied the program, and they're asked if they want to move their user to this new machine + information about what happens when they runs out of moves
 
exactly...
 
this means that if they try to pull a fast one, and copy and use it from two machines, they will quickly run out of moves, in which case they can only run the program from the last machine, and if it's important that they run it from two, they will have to call you
and probably purchase another license
is the server under your control?
 
exactly, about server
yes
the server is connected to internet
do u think its good to install a server program to change users data through internet?
i mean, something like writing a new program and installing it on server machine, in order to control users through internet?
 
good evening
 
who owns the server?
 
11:07 AM
the company i'm working with
@BleuM937 hi, how are you?
i'm not sure if they let me install that program (about users controlling)
 
11:28 AM
@LasseVKarlsen thanks so much for your help
 
evening
 
11:44 AM
Hello everyone, I just observed that InternetExplorerClass.HWND property is crashing in Windows 7 OS. Any idea what could be the reason?
 
Have you tried adidng exception handling and examining the error messages that it gives you?
 
No jamie, I didnt try exception block but it is giving me this runtime error .
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at SHDocVw.InternetExplorerClass.get_HWND()
at Solo4Orchestra.Solo.PostForm(String strUrl, String strPostinfo, Int32 iHeight, Int32 iWidth, Int32 iLeft, Int32 iTop, Boolean Resizable) in C:\Users\mani\Documents\PointCross\trunk\SOLO\Source\Binaries\OrchestraClient\Solo.cs:line 1343
at Solo4Orchestra.Solo.Solo_Load(Object sender, EventArgs e) in C:\Users\mani\Documents\PointCross\trunk\SOLO\Source\Binaries\OrchestraClient\Solo.cs:line 445
on this line.. MessageBox.Show(IE.HWND.toString());
 
When are you executing that line?
 
After executing navigate2 function.
Actually my application open our website. for that We have written a function.
 
So you have the form visible on the screen when you execute that line?
 
11:53 AM
no.. form is not visible
 
So what if you try to execute that when the form is visible?
 
No. Actually requirement is this. When user right clicks on any file on desktop. He can select SendTo-> SendToSolo
when he click this..
this function is getting called
private void PostForm(string strUrl, string strPostinfo, int iHeight, int iWidth, int iLeft, int iTop, Boolean Resizable)
{
this.Visible = false;
object vPost;
object vHeaders;
object oEmpty = "";
object oURL = strUrl;
try
{
IE = new InternetExplorerClass();
}
catch (Exception Ex)
{

MessageBox.Show(Ex.Message);
return;
}
vHeaders = "Content-Type: application/x-www-form-urlencoded" + "\n" + "\r";
vPost = ASCIIEncoding.ASCII.GetBytes(strPostinfo);

IE.Navigate2(ref oURL, ref oEmpty, ref oEmpty, ref vPost, ref vHeaders);
 
But handles aren't necessarily created until the form is actually shown
so "HWND" might not be a valid property to read yet
You can in some cases force .NET controls to create their handles, but I don't know if that will work with the web browser
I would move some of the code to the Shown event of your form and see if that fixes it
 
Oh.. ok.. But in my code you can see 2 lines which I have commented..
This code is working perfectly on Windows XP..
when I try to run same code on windows 7 it is giving error.
hence I have debugged the code and found these two lines are causing problem
When IE.Navigate2(ref oURL, ref oEmpty, ref oEmpty, ref vPost, ref vHeaders); is executed.. browser is visible.
 
On XP ....
 
11:58 AM
but after that it is giving run time error.
on XP there is no error
 
Have you tried executing code in the Shown event instead?
 
everything working fine
I am sorry but what is shown event?
 
Of your form
The form has a Shown event
 
oh ok.. No i didnt try
 
Are you going to?
 
12:02 PM
ok sure I will try. but how that will be related. I mean the problem is only with windows seven..
 
Well, here's a shocker
You might need different code for Windows XP and 7
So the fact that it works on XP is something you must just ignore
First figure out what to do in order to make it run on Windows 7
 
oh ok.. let me try..
 
And then see if that also works on XP, otherwise you need two pieces of code, one for each situation
 
oh ok.. so you will be online? let me try and tell you.
 
hey all, not getting much help on this question, wonder if you guys could notice my massive error? as Im sure im doing something wrong: stackoverflow.com/questions/4051048/…
 
12:13 PM
@JamesStuddart I think it would help if you included the value of the Message from the exception. This should tell you what the error was.
 
I cant seem to find the message, as this exception was grabbed from the event manager and thats all it gives me
running the listener code in a unit test works fine and i can communicate with it
 
So modify your code to capture the message (and the runtime type of the exception).
I suspect you problem is the pipe name... they need to be in the right format
 
the service isnt running long enough for me to connect to it
it just dies
 
Add logging
 
So modify the code to capture the full details (you need this anyway if you want to use a service for real).
I think your problem is the pipe name... added answer
0
A: NamedPipes throwing an exception in windows service

RichardNamed Pipe names need to be in the format: \\.\pipe\pipename See CreatedNamedPipe Win32 API: http://msdn.microsoft.com/en-us/library/aa365150(VS.85).aspx

 
12:21 PM
Ah right ok, ive just added in some further logging to see, ill try the name suggestion, strange that it would work in the tests and now in the server though.
will give it a whirl and get back to you, thanks for the help
 
Another thing worth doing with a service is writing it so it can be run from a console, not just as a service. In the entry point check for a command line switch, (e.g. -interactive) and if present don't call ServiceBase.Run, but instead call OnStart wait for a keypress and then call OnStop. And add Console.Out to the places you write logging to. This allows it to be started from the VS debugger.
 
All pipe instances are busy. is the message
 
I note the example for NamedPipeServerStream doesn't use the \\.\pipe\x format... so that might not be it. Designing for debugging/tracking is just as important as designing for test -- a little extra effort now will make the future much easier.
 
Hi Lasse V. Karls
I tried in Shown method
but it is still giving same error.
One thing I observed is. if I give simple url to navigate2 parameter it is working ifne
*fine
I tried giving google.com
and it is working. its returning HWND
but not working with my url. is it anything wrong with this url?
 
Ok, are you waiting until it has actually retrieved the content?
 
12:29 PM
<pre>http://localhost:1978/solo.pointcross.com/Orchestraweb/?Appid=1&ViewID=12&Bnry=1&InstanceID=b32cb7e6-089f-4bf0-829d-a5b300a1c8b9</pre>
 
Try adding a sleep:

Thread.Sleep(1500);
 
you mean to say. after calling navigate2 method I need to wait is it?
 
I don't know, I'm just guessing
 
Hi all :)
 
ok.. let me try this.
 
12:30 PM
Who is familiar with c# ?
i am sorry
 
I will put this after navigate2
 
@shaahin Probably most people in this room
 
who is Familiar with T4
 
I am, can't speak for anyone else
But you say Familiar with an uppercase F, does that imply more familiar than just familiar? :)
 
@LasseVKarlsen : My question was Wrong ?
Does any body know anything about T4 ?
 
12:32 PM
Yes, I do
 
Good
@LasseVKarlsen : How is it for UI generation?
 
Well, you can certainly do it
But generate it from what?
 
I want To create template for UI (For Web) and generating UI from it
i am looking for sample
I did not find any sample
 
Could be there isn't one, you probably just have to experiment then
 
Generating UI from Database with template
 
12:34 PM
Hi Lasse V.
it is giving this error.. The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
at SHDocVw.InternetExplorerClass.set_Height(Int32 pl)
:(
 
Hi, i have a question what diff does a 32 bit and a 64 bit machine make, i mean i know that it has a wider word at binary lever but what diff does it make on OS level?
 
More memory available on 64 bit
That's the most common difference to take note of
 
more memory for a a program?
 
That depends
 
hi again
 
12:35 PM
hellp
hello
 
If your program is 32-bit, and your machine has 8GB of memory, it doesn't matter if you have 32-bit OS or 64-bit OS, for that program
 
@LasseVKarlsen : would you please give me a link for more information ? (T4)
 
@jaminator hi, how are you?
 
If your program can run as 64-bit, then yes, it will have more memory available
 
great Dr , speciall when weekend is around the corner
 
12:36 PM
But what I meant was that if you equip a machine with 8GB of memory, and run 64-bit OS, you can have more programs running before you run out of memory, even if all the programs are 32-bit
 
IE.HWND is not working in Windows seven.. Can any one help me please?
 
@shaahin This is the holy grail of T4 information: olegsych.com
 
but i i install more memory on 32 bit the diff goes away
 
@jaminator hahaha...
 
then why does MS make a 32 bit OS and a 64 bit OS
 
12:37 PM
@shaahin hi
 
@DrTJ Hi
 
@DrTJ u know this one, then why does MS make a 32 bit OS and a 64 bit OS
?
 
32-bit Windows can't use more than around 3.3GB of memory
 
@LasseVKarlsen Tnx :) Does Is Useful for right to left Direction ?
 
@lasse nice one
 
12:39 PM
@shaahin What do you mean by that?
 
Not all processors that Windows runs on are x64 (e.g. Intel Atom)
So MS needs to maintain 32bit even for new systems
 
and is thsi correct as well the x64 will have more operation set
 
A 32bit process can have between 2GB and 4GB of user address space depending on circumstances.
 
@LasseVKarlsen : i am from iran. in Iran Web and application UI Direction is not Left to right it is right to left.
 
It will be 2GB is not built with LARGEADDRESSAWARE flag (.NET always sets this)
 
12:41 PM
@shaahin Can you specify that in the ASP.NET or MVC UI design files?
 
On 64bit OS with that flag it will be 4GB. So advantage to run 32bit apps on 64bit OS
 
@Richard Isn't it 3GB?
 
@LasseVKarlsen It is 3GB (or rather between 2 and 3) on a 32bit OS, with large address aware flag on the exe and the right boot switch set for the OS
Still do better with a 64bit OS.
 
@LasseVKarlsen : ASP.net
 
@shaahin What?
 
12:47 PM
good morning c#
 
@LasseVKarlsen : You said Can you specify that in the ASP.NET or MVC UI design files?
 
Yes?
And the answer to that would be "Yes" or "No", not "ASP.NET"
 
good night @tom
 
@LasseVKarlsen :) yes
@LasseVKarlsen i mean asp.net web forms not MVC !
 
@ok c# have a gr8 weekend
 
12:48 PM
Yeah, but that was not my question
 
adios
 
You asked if you could use T4 to generate UI with right to left
I asked if you could specify that (as in, right to left) in the UI design files
 
@LasseVKarlsen : Sorry english is not my first language
@LasseVKarlsen : Does it have IDE for Vs 2010 ?
 
Since you are talking about memory usage and .NET I'll sneak in a related Q. A product I'm developing is, from what I can see, triggering a GC when hitting about 1,8GB mem usage and getting some key input. This is observed on a 64bit Win 7 system. Is it normal, can it be leveraged differently?
 
oh my goodness
 
12:51 PM
@shaahin There's a T4 editor plugin that gives you some syntax coloring and if you pay, intellisense, other than that, no
 
@Burre are you developing for .net 4.0? they redid the garbage collector between 3.5 and 4.0
 
@LasseVKarlsen : Dear where R u from ?
 
I build for 3.5.
 
@Burre What is the problem really? Shouldn't it do a GC?
 
well you can call the GC manually, but it's very discouraged by Microsoft
The first thing I'd do is make sure that you're making everything you can IDisposable and wrapping using statements wherever you possibly can.
if you can target 4.0 try that
 
12:54 PM
@tomdietrich Doing GC is fine. Problem is that when it does it seems to halt the message pump for input events.
 
yeah that's 3.5's GC
 
Sry, wrong reply
 
4.0 doesn't affect the input thread
the UI thread actually
 
Ah ok
 
basically the more stuff you have the longer the GC is going to take to clear your stuff
 
12:55 PM
Are there any legacy concerns with moving to 4.0? Any platform restrictions.
 
so you wanna make sure that you make it's job easier. that's all you can really do on 3.5
 
@tom Where can I read more about the changes to the GC in .NET 4.0?
 
whats the current topic..
 
Ok, simplifying can be difficult. It is an enterprise application that does a lot of analysis and calculations on huge amounts of data.
 
there is a section on garbage collection
 
12:57 PM
@Lasse: blogs.msdn.com/b/maoni is a good source too
 
"The .NET Framework 4 provides background garbage collection. This feature replaces concurrent garbage collection in previous versions and provides better performance."
 
Thanks @tom and @joren
 
and to answer your other question, we haven't had any issues with 4.0
 
@tomdietrich I'll try building for 4.0. Thank you for the tip.
 
@LasseVKarlsen : Thanks FOr your good Information :) i have to go
may i have your email address ?
 
1:00 PM
Check my profile page, at least on parent site (SO)
But I'd appreciate it if you asked questions on SO or here, instead of emailing me directly
 
@ ok thanks
 
Chances of getting good answers are much better if you do ;)
 
Hi All, Anyone having Experience on Open XML SDK 2.0
I have this question posted on SO, any considerations or suggestions would be helpful - stackoverflow.com/questions/4021859/…
 
1:25 PM
ATTENTION C# GURUS! I need your wisdom! Why would one work, and the other doesn't?
1
Q: Why does this work and this doesn't?

Sergio Tapia public Form1() { InitializeComponent(); comboBox1.DisplayMember = "Name"; comboBox1.ValueMember = "ID"; LoadUsersToComboBox(); } PersonRepository peopleRepo = new PersonRepository(); private void LoadUsersToComboBox() { comboBox1...

 
@Sergio please check following link msdn.microsoft.com/en-us/library/x8160f6f.aspx
and KMike answer on your post
 
@NitinMidha That links doesn't really shed light on the reasons why it would work the first time and not subsequent times.
Well my code is working, but my coworker and I were just curious because one works, and the other doesn't.
It doesn't make any sense to us. :P
 
1:41 PM
@sergio, i'm guessing the enumerator from the IQueryable returned by FindAllPeople() isn't getting reset.
 
MVVM breaks my head sometimes
like why am I re-creating my whole model domain with shadowing view models
shouldn't there just be one viewmodel per view which wraps up many models?
 
i don't know I like it
@tomdietrich I think that's what you're supposed to do. Create a single ViewModel that sexily wraps everything your view would need.
 
that's what I thought too
 
/me still doesn't buy MVVM over presenter first.
 
but it seems like most frameworks expect your VM to be one level deep
 
1:47 PM
What framework are you using? I've onyl ever used MVVM in Silverlight/MVC2 applications
 
good morning all, look at all the customer submitted images for this product, lmao: amazon.com/AutoExec-WM-01-Wheelmate-Steering-Wheel/dp/…
 
@Shogun yeah saw it on Reddit absolutely hilarious! i especiallylike the Biker review
 
<3 reddit
 
Caliburn.Micro
 
I like Reddit, but sometimes the "bacon narwhal colbert" crap gets on my nerves. Luckily I can just hide that crap. :3 The massive influx on digg users took a crap on the community though
 
1:54 PM
@Sergio bacon what? lol
 
Nah, it's just there's some massive circle jerking now more than ever on Reddit :P
 
oh haha
I don't like how they are kind of hypocritical, and so anti-republican and christian, whereas any other religion will be defended tooth and nail it seems
 
Yeah herds of people are stupid, ANONYMOUS herds of people are insanely retarded. :P
 
haha true, but at least good for a laugh
 
anyone know a reasonable way to parse Visio drawings in .net?
 

« first day (13 days earlier)      last day (4939 days later) »