« first day (1077 days earlier)      last day (3888 days later) » 

6:02 PM
@Greg Cool, thanks for the response. I'll have to check out those books sometime.
 
@JeffBridgman Yeah, I highly recommend them. They have alot of good information; great references.
 
@ReedCopsey sorry the x is where y should have been
if (IsValid) {
	if ((x!= null) && (y!= null) && (z.a!= null) && (z.a.b != null) && (c != null)) {
		c.Comment = x;
		c.CompletedDatetime = y;
		c.CompletedByAppUserID = z.a.b;
	}
}
 
@kush Then that's fine, provided you want it to not write anything if any input is null
if you wanted it to still write Comment if the completion date is null, it won't
 
I am getting an object reference error on a machine I can't reach and debug and on machines I can reach and debug, I don't see the error :(
 
z is nul
 
6:15 PM
that's always possible
you can always put in exception handling and log with stack traces, too
 
@ReedCopsey I probably should
 
I just love how confused people get by covariance and contravariance - stackoverflow.com/q/19057493/65358
 
(Emergency) VS isn't loading my pdb file for debugging a minidump. It says "A matching symbol file was not found in this folder." when I try to open it. Any ideas why?
 
@KendallFrey stupid questions incoming from me
did you clean/rebuild the project?
 
No, I copied the exe and pdb from the build server.
 
6:30 PM
did you copy the config as well?
 
AFAIK they should match the ones that created the dump.
@Pheonixblade9 No.
 
try that
 
It's not there.
 
hmm
is there a .xml file?
with the same assembly name
 
nope
 
6:31 PM
EnvironmentLibrary?
 
I'd be surprised if it was different than what's in my bin folder.
@Pheonixblade9 Er, no
 
right, just trying to cover bases
like I said, stupid questions incoming :)
have you restarted the debugger?
is there a .manifest file in your build folder?
 
no & no
 
probably what happened is you need to rerun the build
so that the .exe and .pdb are generated at the same time
 
actually, there's a vshost.exe.manifest
 
6:33 PM
ok
you need that
 
@Pheonixblade9 But then the symbols won't match
 
hm
try adding the manifest
 
to what?
 
also, the symbols are already not matching
to the folder you're debugging from
I believe that tells the PDB where to look for things
or rather, the debugger
 
the manifest for vshost?
 
6:35 PM
yeah
it might only be for VS, but it's worth a shot
 
But I'm not debugging the vshost
 
where are you debugging from?
 
back on the phone
 
@Pheonixblade9 my chair
 
6:36 PM
>.> I'm trying to help, turn down the smartass until we fix your problem :P
uhm
where is the program running? the phone?
 
my coworker is working on it for now
 
oh ok
I usually solve that problem by restarting VS and rebuilding
 
@Pheonixblade9 is or was?
 
but it seems that was not an option
 
I can't rebuild, I'm debugging a crash dump from a specific binary.
 
6:37 PM
yeah
sorry I wasn't more help :/
that is a difficult problem if it doesn't "just work"
 
thanks for your ideas
Now, how do I serialize to a string with XmlSerializer?
 
@KendallFrey Serialize into a MemoryStream, then Encoding.UTF8.GetString(ms.ToArray)
 
well, you can just let it do it automatically, or you can add attributes for custom behavior
 
ugh
 
try {
    return true;
}
catch { ... }
return false;
 
6:43 PM
but yeah, that ^
 
@RoelvanUden I was hoping for something better, but that will work too.
 
@KendallFrey what's your input and desired output? there are a couple ways to serialize
do you want it to be human-readable?
 
Oh yeah, StringWriter works too.
 
Serialize to StringWriter, then call ToString() on it: msdn.microsoft.com/en-us/library/system.io.stringwriter.aspx
 
It was an X-Y question. I really want to buffer output, so exceptions in the serializer don't royally fuck up the file.
 
6:45 PM
StreamWriter is a lot easier to debug than MemoryStream
 
I am tired of debugging.
 
well, a try/catch around serializing to the stream writer would make it easy - can then you can do the serialization, then just dump the text to a file afterwards, if it succeeds
 
double clicks .xml file; IE pops up AAAAAUGH!
Aaand the file is blank.
Which one do I need to flush?
Probably the one I'm not disposing, right?
 
yeah, probably
 
Aaand now I need to wait on a data upgrade
And now I get a file not found error
We're all fucked.
Oh crap I can't read encrypted data.
(I use the term "encrypted" loosely)
Still empty.
Customer's gonna give us a shitstorm
s/gonna give/is giving/
 
6:56 PM
just wrap the StreamWriter in a using()
it'll close the file for you for freebies
g2g to lunch now
 
I wrapped the memorystream in one
 
why are you using memorystream?
 
Can't dispose the other one
@ReedCopsey To buffer the result
 
can you show your code?
 
XmlSerializer tSerializer = new XmlSerializer(typeof(Foobar));
using (MemoryStream stream = new MemoryStream())
{
	tSerializer.Serialize(stream, foobar);
	fileStream.SetLength(0);
	stream.CopyTo(fileStream);
	fileStream.Flush();
}
got it
Needed to rewind the memorystream
3 hours ago, by Kendall Frey
Days like these I wish I'd become a drive-thru cashier.
<profanity>
I feel like I'm the ginger, and the other two guys are tabs and spaces.
I'm getting screwed over by them both.
 
7:05 PM
sry @Greg was away, what does Log generate now?
 
@dirt Not sure, the Data Center host are doing things to it now to try and fix it
 
oh noz not Tier 1
 
@dirt ...?
 
heh tier1 support techs?
level 1
Let me know if they cant figure it out, theres more tshooting to do
 
7:57 PM
    This should return true right?
        public static bool IsAbleToWriteToFolder(string folder)
        {
            WindowsIdentity account = WindowsIdentity.GetCurrent();
            DirectoryInfo directory = new DirectoryInfo(folder);
            DirectorySecurity access = directory.GetAccessControl(AccessControlSections.Access);
            AuthorizationRuleCollection rules = access.GetAccessRules(true, true, typeof(NTAccount));

            return rules.Cast<AuthorizationRule>()
                .Where(rule => rule.IdentityReference.Value.Equals(account.ToString(), StringComparison.
 
8:12 PM
Is able: False
I apparently dont have access to my C:\ drive...
 
...?
 
using System;
using System.Linq;

namespace Vendor
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(IsAbleToWriteToFolder("C:").ToString());
            Console.ReadLine();
        }
        public static bool IsAbleToWriteToFolder(string folder)
        {
            System.Security.Principal.WindowsIdentity account = System.Security.Principal.WindowsIdentity.GetCurrent();
            System.IO.DirectoryInfo directory = new System.IO.DirectoryInfo(folder);
 
It says you can't write to your C: with it?
 
False for me on both version
 
So, that would explain why this error is constantly being thrown:
if(EvaluateAccess.IsAbleToWriteToFolder(root) == false)
                throw new Exception("Error Message: " + Environment.NewLine
                    + "You currently do not have the proper permission to access the "
                    + " following directory: " + root + " Please ensure the account is "
                    + " running within the proper account to perform this task.");
 
8:23 PM
Can't write to C: unless you're running elevated ;)
 
ya - i have admin right and I am not able to do it with elevated vs - or c:\tmp
 
I always run elevated
Path: C:\Users\dirt\AppData\Local\Temp\ : False
 
Well, I'm trying to figure out why this permission thing is popping up errors.
 
I sure hope an emergency doesn't come up tomorrow, because I am going to be on a lazy binge.
 
That's a weird requirement in that question, isn't it @KendallFrey?
average price per hour seems odd
 
8:37 PM
ikr
Totally threw me off
 
I think what I wrote is what the OP wants
but it's odd enough I'm not 100% sure ;)
 
@ReedCopsey So, should be code be true or false? I can't seem to get the exception from not being thrown; on my local machine it was working now it isn't.
 
NOTTHOR\dirt has write access to C:\Users\dirt\Desktop\
Path: C:\Users\dirt\Desktop\ : True
@Greg I got you...
 
@dirt So it did work?
 
@Greg It really depends a lot on the environment - if you run that from a console app, it'll work fine (elevated)
for example
 
8:40 PM
        public static bool IsAbleToWriteToFolder(string folder)
        {
            WindowsIdentity account = WindowsIdentity.GetCurrent();
            string NtAccountName = account.Name.ToString();

            DirectoryInfo di = new DirectoryInfo(folder);
            DirectorySecurity acl = di.GetAccessControl(AccessControlSections.All);
            AuthorizationRuleCollection rules = acl.GetAccessRules(true, true, typeof(NTAccount));

            //Go through the rules returned from the DirectorySecurity
 
Well, it is in a WCF Service being consumed.
 
in IIS, there are tons of settings that change how it works (the link I put in earlier shows how they do things)
 
Sorry I left it in console app status
 
@Greg WCF hosted in IIS?
 
just need to remove the console.writelines and it will return bool
 
8:43 PM
That is basically the same as what I wrote; except mine is in Linq; also that is asking for All rather then Access.
 
@Greg Again, are you doing this from WCF hosted by IIS? If so, the settings make a huge difference.
 
@ReedCopsey Yeah, I am.
 
that explains what you'll get for WindowsIdentity.GetCurrent() based off the settings you have
the middle listed "Resultant Idenitity" is what you'll see
 
Okay, I'll look it up. I'm almost tempted to just start rewriting the entire thing on the damn production server. God, I wish the server vs local wasn't so different.
 
Yeah well, that one works ;)
 
8:50 PM
@dirt Mine worked locally, it wasn't until it was hosted in IIS that it gave me the finger and said "I hate you."
 
hrmmm ok I haven't tested it in IIS
 
IIS will completely rewrite the rules of how WindowsIdentity works
that link talks about it
 
Maybe I should take out that form of error checking.
 
hey kids
 
So, how do I wait in a deeper iteration of a recursive function, for the first iteration to complete?
lol
That's crazy.
But somehow, something is running async, and my button handler is running several times inside itself
No, I'm not on acid.
 
9:04 PM
disable the button handler?
and reenable it when the async operation finishes?
 
But then stuff won't happen :/
 
would need to see code ;)
 
You don't want to.
 
but in general, I'd refactor the handler to call a recursive function
 
Translation: That, and the fact that it's too complex.
 
9:04 PM
and disable the button handler while the funciton's running (so you don't call into it 2x)
but without more info, tough to say for sure :)
 
I wonder if there is a way to make Crystal Reports sync
 
@KendallFrey I hate Crystal Reports'
 
Me too.
0
Q: Why can't I asynchronously load ReportDocuments in Crystal

MarcelUsing the code below we run into an issue with Crystal. It seems ok to create ReportDocuments but not to load these simultaneously (DESPITE the fact they are loaded from different PHYSICAL places) It works fine with the lock in place, but remove that lock and it freezes!! Does anyone have any ...

This
 
user1804599
Good morning.
 
quite possibly my favorite method name: TestNastyApostropheSanitization
 
9:15 PM
Later everyone, @Pheonixblade9 @ReedCopsey See you two tomorrow.
 
@Greg When you are getting there? Trying to be there for the first talk?
 
Yeah, I'm leaving at around 4 AM
 
Is it bad practice to have an unnecessary finally after a catch (Exception)?
 
@Pheonixblade9 Yeah, you and @ReedCopsey have my number; I'll catch ya both tomorrow.
 
9:19 PM
@Greg I'm going to try to get tehre for the 2nd round (I may miss the first) - feel free to text me or call in between talks, though, and we can meet up
 
@ReedCopsey I thought you were speaking in the morning?
 
@KendallFrey That does nothing? I'd remove it if it's not necessary
@Pheonixblade9 11:30 - 3rd round of talk
sorry - 11:00
 
It does something, but there will never be an unhandled exception, right?
 
it'll run even if the exception handler raises an exception ;)
without hte finally, if the catch throws, it won't run
 
It won't.
Promise.
 
9:20 PM
then it doesn't need to be there
(but leaving it prevents somebody else from breaking that code, potentially)
 
Bah, I don't care about anything.
 
@KendallFrey do you need a hug?
 
Not from you, you twisted pedo.
@Steve where are you?
        this.CurrentReportDocument.Close();
        this.CurrentReportDocument.Dispose();
        this.CurrentReportDocument = null;
        System.GC.Collect();
        GC.WaitForPendingFinalizers();
Holy crap, someone wants to get rid of that thing
 
Have they not heard of using?
 
dunno
I just used Close and had no problems.
 
9:29 PM
ouch
Close and Dispose should be the same
(though safe to call more than once)
 
Yeah
 
collecting is just ugly, though
surprised there wasn't a second collect call to clear out the memory, too :p
 
:D
The worst part is clearly how they use System.GC on one line, but GC on the next.
I may not have OCD, but DIE
 
yeah - that's an interesting choice
half qualifying the calls ;)
it's like when you see code that's written as:
Int32 Foo(int bar, float baz, Double nowImJustConfused)
 
It's not as bad string vs String though
You beat me
 
9:33 PM
:D
 
What's even worse is thinking String is reference, and string is value.
Even worse: your team lead thinking that
Disadvantages of working from home: Not being able to run away after a stressful day.
A minute after posting that, the phone rang again.
 
lol
Well, my coworker just explained over the cubicle wall to the other developers that I was intentionally sabotaging him and the project by giving him an impossible task
And I can't run either
 
(At least) one of the database tables had the indexes completely wiped out.
 
Lets change the subject, who's hiring so I can escape this nutcase?
 
@walkingTarget We are (or were)
 
9:43 PM
somebody earlier today was looking for people, too
 
If I want to make a family of [DataContract]???Request objects that inherit from a base class for use in WCF is there anything I should be aware of?
 
Ontario would be a bit of a move
 
@walkingTarget What about Pennsylvania?
 
I live in Portland, OR... so
 
We also work with remote developers.
We have a guy from Colorado
 
9:46 PM
What's your company?
 
Do you know JS?
 
Not very well
 
That's pretty much a requirement I think
 
Ah, oh well
 
You'd have to work in our timezone too probably
 
9:47 PM
I start at 7am now, so that wouldn't be hard, unless you start really early
 
Not sure if you want to get up at 5-6
We have our scrum meeting at 9 EST
 
I'm going sailboat racing next weekend! :D
 
No biggie
@Pheonixblade9 Taking Larry Ellison with you? =O
 
@walkingTarget haha, nah, though our CEO might go
 
10:04 PM
Oh dear... does WCF really not allow method overloading?
 
nope - you need separate names, typically
 
@JeffBridgman HELPER METHODS
that's what I usually do, anyways
 
Gui
10:25 PM
yo whats up guys
 
not much... waiting for a process to finish
 
10:41 PM
@Pheonixblade9 Hmm, not sure if I follow... although I just realized maybe I don't really need overloads. All my overload objects inherited from a single one so maybe I can just make the base and it'll (crosses-fingers) work.
 
Heh... that blew up. Passing an inherited type in place of the contract type didn't make it very happy :P
 
oh yeah
you can't do that as an endpoint
I think WCF does some fancy mapping/reflection stuff for you to get from a request to an executed method
 
@JeffBridgman Have you looked at [KnownType] and similar interfaces? They're required if you're passing subclasses
 
@ReedCopsey nice - I didn't know about those :)
 
10:50 PM
there's also [ServiceKnownType]
they're all pretty limited, though
 
11:07 PM
@ReedCopsey I'll have to check that out... that's probably my problem.
 
btw.. free museum day tomorrow
 
11:46 PM
Why does this sound like a very bad idea? stackoverflow.com/questions/19061679/…
that'd drive users crazy :S
 

« first day (1077 days earlier)      last day (3888 days later) »