|
Newf posted:I cannot help, but you have my sympathy. These are the parts of development that make me want to jump out of a plane. You're telling me. I can't even add the 4.0+ Chart Controls to my toolbox anymore in VS 2013. They're in my GAC and I can add references to the project but if I try and add them to my toolbox they're not in the list of available .NET components, I have to browse to the files or drag them onto the toolbar. The former produces a message telling me either the DLL is invalid or doesn't exist, depending on what version I try. The latter produces a default 'bing' sound and absolutely nothing else This is after completely uninstalling and reinstalling VS and the .NET Framework. Some of these chart widgets are on the main dashboard of the software so I can't even do any changes to that any more because even I changed something unrelated, the designer fucks the charts up. I've had to go back to an older branch of the project on VS 2008 for now, but the other migrated version has a couple of months of work on other features on it, including changes to various forms, so including designer files, and I've no idea if it'll even be possible to merge that into the unmigrated VS 2008 branch without buggering up everything.
|
# ? Jul 11, 2014 13:51 |
|
|
# ? May 4, 2024 13:47 |
|
ultimately winforms designer work translates directly into .cs or .vb code generation. you SHOULD just be able to copy the code changes across if you do it textually or with some non-VS tool
|
# ? Jul 11, 2014 14:14 |
|
I have an issue that is driving me absolutely bonkers. I have a C# app that is running as a service on a windows server. It polls a bunch of different shopping cart web services on a fixed schedule. For one particular client, it fails with a SSL/TLS error that the certificate is not trusted. This is only for that client, we can query that same exact service for other clients on their servers. The error only appears though after the service has been running for a couple of hours. If I shutdown the service and restart it, it starts working again for awhile. - I have explicitly trusted their cert and the intermediary cert on the windows server where we run the C# service. - When running the plugin using a unit test I setup and using the client credentials for their service, it works fine - I have no SSL errors or anything when browsing to the client's website, it looks fine - Rackspace looked at our server and claim it is all setup right I am about to lose my mind since it works for an hour or so, then stops, and it is working fine for all of our 100+ other integrations that the service polls.
|
# ? Jul 11, 2014 14:36 |
|
So when you say "client", the part that's failing is when the customer connects to your service from their own machine? The first step would be reproducing the failure, even if you have to do it live. Then instead of just "not trusted" (which could be anything) you can take a look at the failure and see the exact reason it's not trusting the certificate.
|
# ? Jul 11, 2014 15:06 |
|
Begby posted:I have an issue that is driving me absolutely bonkers. Can the server download a CRL? Does it have access to the CRL? Sounds like it does a check after awhile and can't validate the chain or something. One thing you can test is to download the certificate and use the windows Certutil utility to check if you can build the certificate chain. It uses the exact same apis as .Net does so any error should also turn up in there. Another thing: Is the service running as a user and does it have the rootcerts in its own cert store?
|
# ? Jul 11, 2014 16:06 |
|
Huragok posted:I'm not 100% sure but aren't solution project files selected for loading/unloading using the .vsproj? If that is the case and you use source control you should break out the rubber hose () because someone must be committing the .vsproj with projects unloaded. I can't find any diff in either the relevant vsproj files or the sln that would explain this.
|
# ? Jul 11, 2014 17:33 |
|
So I'm on .NET 4.5 and apparently it doesn't like to sign things the old 4.0 way, even if I publish it as a 4.0 app. WTF.
|
# ? Jul 11, 2014 18:23 |
|
I have data I need to process with record times at nanosecond resolution (specifically, measured in nanoseconds since the start of the year the data was recorded in, stored as uint64). For now I just need to turn it into a human-readable date and time, like 2012 May 28 11:35:58.000045921 (edit: adjustments will need to happen later, but that's not an immediate requirement). I figured at first (being a .NET and C# newbie) that DateTime would be able to do it with some finagling, but I guess from google that it only can store down to the microsecond, chopping off the 921 nanos at the end there. (Apparently they're important. ) (edit: or is it 0.1 microsecond? Anyway still two digits short in that case) Do I have any options short of, say, making the DateTime with the microsecond precision out of the uint64 nanos, ToString()ing it, and just tacking nanos % 1000 to the end of the string? Strikes me as maddeningly clunky, even if it'd work for now. Ciaphas fucked around with this message at 00:25 on Jul 12, 2014 |
# ? Jul 12, 2014 00:17 |
|
Ciaphas posted:I have data I need to process with record times at nanosecond resolution (specifically, measured in nanoseconds since the start of the year the data was recorded in, stored as uint64). For now I just need to turn it into a human-readable date and time, like 2012 May 28 11:35:58.000045921 (edit: adjustments will need to happen later, but that's not an immediate requirement). I figured at first (being a .NET and C# newbie) that DateTime would be able to do it with some finagling, but I guess from google that it only can store down to the microsecond, chopping off the 921 nanos at the end there. (Apparently they're important. ) (edit: or is it 0.1 microsecond? Anyway still two digits short in that case) DateTime precision only goes down to the 100 nanoseconds. If you just want to use the built-in formatting DateTime formatting options, then I would say to make a class that wraps DateTime (e.g. PreciseDateTime) to delegate .ToString() calls and use whatever level of precision you need.
|
# ? Jul 12, 2014 03:21 |
|
Bognar posted:DateTime precision only goes down to the 100 nanoseconds. If you just want to use the built-in formatting DateTime formatting options, then I would say to make a class that wraps DateTime (e.g. PreciseDateTime) to delegate .ToString() calls and use whatever level of precision you need. It might be worth looking at NodaTime, too. I don't know if it has that level of precision, but since it's maintained by a notorious calendar nerd, I wouldn't be surprised if it does. [edit] Actually, nevermind. It doesn't... yet. https://twitter.com/jonskeet/status/484436917602516994
|
# ? Jul 12, 2014 03:25 |
|
gently caress them posted:So I'm on .NET 4.5 and apparently it doesn't like to sign things the old 4.0 way, even if I publish it as a 4.0 app. WTF. 4.5 is not fully backwards compatible with 4.0 - there are other issues like this if you need to deploy to a 4.0 system you should also do builds & tests on one
|
# ? Jul 12, 2014 08:52 |
|
Does anyone use the VS ASP.NET template projects (the ones that generate a whole ton of controllers/views/etc for you) when starting a new project? Do you create a project using the MVC/Web API/SPA templates and modify it as required, or do you start from a blank project and add things according to your own requirements and ideas?
|
# ? Jul 12, 2014 09:00 |
|
I sometimes scaffold a view or two and then customise it, just to get all the labels and displayfors and things in place first, but I generally do it manually. Controllers I always just write from scratch.
|
# ? Jul 12, 2014 14:06 |
|
Gul Banana posted:4.5 is not fully backwards compatible with 4.0 - there are other issues like this I just didn't sign, since it's an internal app. I did see indications that there are ways to just make a key with the old algo and use that, though.
|
# ? Jul 13, 2014 02:11 |
|
Bognar posted:DateTime precision only goes down to the 100 nanoseconds. If you just want to use the built-in formatting DateTime formatting options, then I would say to make a class that wraps DateTime (e.g. PreciseDateTime) to delegate .ToString() calls and use whatever level of precision you need. Thanks, I had a feeling it was gonna come down to that but I just wanted to make sure. I guess overriding all the calls I care about for actually manipulating those times won't be too awful. drat sight better than fuckin' struct tm and time_t horsehockey, anyway. Going from C/C++ for over a decade to learning how to C#/.NET is kind of eye-opening.
|
# ? Jul 14, 2014 02:31 |
|
Does anyone have any good SignalR resources? Or has anyone used SignalR and can provide some feedback? I'm trying to send messages with different subsets of a dataset to different clients and I'm not seeing any good guides on how to do that. As an example, I'd like to update stock quotes only for stocks in a given clients portfolio rather than just send all stock quotes and have the client decide which ones to display. I'm not sure that SignalR is the right method for this task but I wanted to play around with it and this seemed like a decent learning application to try.
|
# ? Jul 14, 2014 16:01 |
|
Ochowie posted:Does anyone have any good SignalR resources? Or has anyone used SignalR and can provide some feedback? I'm trying to send messages with different subsets of a dataset to different clients and I'm not seeing any good guides on how to do that. As an example, I'd like to update stock quotes only for stocks in a given clients portfolio rather than just send all stock quotes and have the client decide which ones to display. I'm not sure that SignalR is the right method for this task but I wanted to play around with it and this seemed like a decent learning application to try. I've only played with SignalR a little bit, but you should be able to create groups, then send messages to just members of that group. http://www.asp.net/signalr/overview/signalr-20/hubs-api/working-with-groups
|
# ? Jul 14, 2014 18:01 |
|
SignalR groups might be able to do what you need, but I imagine you would want to handle choosing which client to send updates to yourself. Groups don't scale as well as users do, and I imagine you would have to set up a group for each ticker which users would join if they want subscriptions. With stocks, that means you'd have a ton of groups. You should be able to use the PersistentConnection API to send messages to individual clients. You'll have to manually keep track of who should be receiving updates depending on the data, but this should work better than having the client subscribe to a large number of groups.
|
# ? Jul 14, 2014 18:36 |
|
Well, after my previous posts, I can no longer add chart controls of any version to my toolbox in Visual Studio, to the point where I've had to install Windows and VS 2013 on a VM today in order to do anything. Incidentally, on the VM, if targetting .NET 3.5, I can add chart controls to my toolbox and add them to a form in the designer and it seems but, but if I close and re-open the solution again, the designer freaks out in the same way as before, saying the types are undefined. Even though I added them in the same environment right before. Targeting .NET 4, I can add the controls. At this point I think I might just force an upgrade on my users.
|
# ? Jul 14, 2014 21:03 |
|
Ochowie posted:Does anyone have any good SignalR resources? Or has anyone used SignalR and can provide some feedback? I'm trying to send messages with different subsets of a dataset to different clients and I'm not seeing any good guides on how to do that. As an example, I'd like to update stock quotes only for stocks in a given clients portfolio rather than just send all stock quotes and have the client decide which ones to display. I'm not sure that SignalR is the right method for this task but I wanted to play around with it and this seemed like a decent learning application to try. I've worked on something similar where I need to push out data from a data set where it's different content for each user. What I did was treat the user as a group using their ID as the group name and then build up the data that they should see and send just that in the update(I presume if you're dealing with user portfolios you have what they should see stored some how). You will be repeating some of the data you send out for sure but it was the least messy method I could come up with. I set up a Hub to deal with security for users connecting and handling all the updates to the dataset since it's all data that's constantly changing. You can read more about Hubs here: http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-server My system only has about 30 users currently though so I have no idea if it will scale up well.
|
# ? Jul 15, 2014 10:36 |
|
Mr Shiny Pants posted:Can the server download a CRL? Does it have access to the CRL? Sounds like it does a check after awhile and can't validate the chain or something. Thanks for this, finally got back from a camping trip and working on this today, I'll see if I can get it to work.
|
# ? Jul 15, 2014 14:38 |
|
I'm trying to combine a few components of the Enterprise Library. In this instance, I want to implement some retry logic (Transient Fault Handling) but I want to add this in behind-the-scenes (via Unity Interception). I'm using interception elsewhere but I can't seem to figure out the syntax needed to add these two components together. For interception, this will essentially be a no-op, but is where I can add my retry logic, within an IInterceptionBehavior: code:
code:
code:
tl;dr I know how to use Transient Fault Handling and Unity Interception, but don't know how to combine them together
|
# ? Jul 15, 2014 14:41 |
|
So I finally felt like playing with LINQ code:
Why is the where executing before my select?
|
# ? Jul 15, 2014 19:02 |
|
gently caress them posted:So I finally felt like playing with LINQ It isn't. It works fine in an arbitrary console application. What's this "Dump" extension method? BTW, the idiomatic way to do this in VB would be with query syntax: code:
New Yorp New Yorp fucked around with this message at 19:26 on Jul 15, 2014 |
# ? Jul 15, 2014 19:18 |
|
Ithaqua posted:It isn't. It works fine in an arbitrary console application. What's this "Dump" extension method? For linqpad, so I can see the output. Otherwise it just runs and doesn't display anything. What's happening in my app is apparently hyphenated DLNs arenot passing through the masking. However, the select SHOULD strip hyphens out first. Do you think that the hyphens that I'm taking as input might be different from the hyphens I'm using in the inlined defined list for my linqpad?
|
# ? Jul 15, 2014 19:26 |
|
Ithaqua posted:It isn't. It works fine in an arbitrary console application. What's this "Dump" extension method? I can confirm that it works fine. It outputs "H012345678901" twice. gently caress them what are you expecting as output? You have a NullReferenceException in your Where clause. You should check String.IsNullOrWhiteSpace first and then run the Regex on your string. The Dump extension is something in LinqPad to know what to output.
|
# ? Jul 15, 2014 19:28 |
|
gently caress them posted:Do you think that the hyphens that I'm taking as input might be different from the hyphens I'm using in the inlined defined list for my linqpad? Entirely possible. – is a different character from -.
|
# ? Jul 15, 2014 19:33 |
|
Ithaqua posted:Entirely possible. – is a different character from -. My hunch was correct. gently caress FONTS. EDIT: NOPE I'M EVEN DUMBER gently caress ME The split wasn't working right and had a whitespace before the H. So, because I had a ^ at the start of my regex it didn't match, since it was looking for the start of a string. It wasn't, it was a whitespace. Welp I fixed it. Fuck them fucked around with this message at 19:47 on Jul 15, 2014 |
# ? Jul 15, 2014 19:34 |
|
seregrail7 posted:I've worked on something similar where I need to push out data from a data set where it's different content for each user. What I did was treat the user as a group using their ID as the group name and then build up the data that they should see and send just that in the update(I presume if you're dealing with user portfolios you have what they should see stored some how). You will be repeating some of the data you send out for sure but it was the least messy method I could come up with. I set up a Hub to deal with security for users connecting and handling all the updates to the dataset since it's all data that's constantly changing. How did you keep the service alive to push changes to users? All of the examples that have used timers have been for SignalR 1.0 which registered the service in global.asax to keep the service alive. The 2.0 examples using OWIN startup seem to use RX. Ideally though, I'd like it not to be timed. As in I get a message with a quote tick that pushes to the hub/persistent connection which pushes to the client. However, it seems like SignalR doesn't support that or my RX skills aren't very strong.
|
# ? Jul 15, 2014 19:49 |
|
It was SingalR 1 that I used and I followed this guide: http://www.asp.net/signalr/overview/signalr-1x/getting-started-with-aspnet-signalr/tutorial-server-broadcast-with-aspnet-signalr Essentially you create a Broadcaster that's a Singleton which holds onto all the information while your Hub just tells it about new connections etc.
|
# ? Jul 16, 2014 09:49 |
|
Anyone have any experience connecting to Sharepoint services? Problem I'm having is that when I start my application and it connects to the service, it gets the reply: the remote name could not be resolved: 'localhost'. But when I then use a browser to go to the wsdl on the server, and then run my application again, connecting to the service does work. Any ideas? Edit: when I download the wsdl in my program first (with WebClient), it works too. But only when I set the Credentials to the DefaultNetworkCredentials. uXs fucked around with this message at 14:15 on Jul 16, 2014 |
# ? Jul 16, 2014 14:07 |
|
uXs posted:Anyone have any experience connecting to Sharepoint services? Can't say specifically about Sharepoint, but this stopped us dead trying to intiialise an old web service on a new machine yesterday: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6550f476-9c8c-4056-a153-2074fa2f6993/error-cs2001-cs2008 The response we were getting was "cannot resolve <servername>" as well. Fix was to give permission for the asp.net process to modify the Windows/Temp directory. E: wrong url
|
# ? Jul 16, 2014 14:24 |
|
What method does HashSet<> use in order to determine whether an element is already a member of the set? I've got a set of bean objects, but I'd like only one field in the bean to be the 'key' for insertion. Eg, I want to prevent the insertion of new objects into the set if it's key is already contained in the set. I has assumed from the name that it was checking hashes as a unique ID, but the following doesn't work: code:
|
# ? Jul 16, 2014 14:35 |
|
Newf posted:What method does HashSet<> use in order to determine whether an element is already a member of the set?
|
# ? Jul 16, 2014 14:46 |
|
Newf posted:What method does HashSet<> use in order to determine whether an element is already a member of the set? So, you want to quickly store and retrieve key-value pairs. Why are you not using a dictionary?
|
# ? Jul 16, 2014 14:56 |
|
Betjeman posted:You'll need to override Equals I think This is correct. HashSet first checks the hash, then checks for equality using the specified equality comparer (which will most likely be EqualityComparer<T>.Default which uses .Equals()). But yeah, you should probably be using a Dictionary.
|
# ? Jul 16, 2014 15:00 |
|
That had occurred to me, but wouldn't a dictionary's default action be to overwrite the data associated with an existing key with the new data? (edit: it throws an exception.) I want to keep the original. In particular, the only thing that changes with the new inserts is a timestamp, but I'm only interested in knowing the earliest timestamp. Semantically, it's a set of these objects, and the 'Key' here is itself data, so I don't like splitting the object into Key / Value. Newf fucked around with this message at 15:43 on Jul 16, 2014 |
# ? Jul 16, 2014 15:06 |
|
Bognar posted:This is correct. HashSet first checks the hash, then checks for equality using the specified equality comparer (which will most likely be EqualityComparer<T>.Default which uses .Equals()). Ah, that clarifies. Overriding Equals did work (thanks Betjeman!), but I was confused because I knew that Add (and Contains) were supposed to be O(1), so I figured that it had to be checking with GetHashCode(). Makes sense that it's done as a first pass. Thanks all.
|
# ? Jul 16, 2014 15:10 |
|
seregrail7 posted:It was SingalR 1 that I used and I followed this guide: http://www.asp.net/signalr/overview/signalr-1x/getting-started-with-aspnet-signalr/tutorial-server-broadcast-with-aspnet-signalr Hey thanks. I think that example would be better to carry over into SignalR 2. Previous articles I read seemed to require a timer to be a registered object to keep the server alive which I'm not sure if I can do in SignalR 2.0 since it's not activated through a global.asax. I'm still playing around with setting up a pub/sub message bus because that would seem to fit a true quote stream scenario better than a timed update, but this is a good start too.
|
# ? Jul 16, 2014 15:10 |
|
|
# ? May 4, 2024 13:47 |
|
Betjeman posted:Can't say specifically about Sharepoint, but this stopped us dead trying to intiialise an old web service on a new machine yesterday: That... looks like a completely different problem?
|
# ? Jul 16, 2014 15:30 |