|
Smugdog Millionaire posted:Using ILSpy I haven't been able to track down which part of my code actually spawns the objects in question, so I can't try to write my way around it. Just set a breakpoint in the object's constructor then (use WinDbg if Visual Studio won't do it).
|
# ? Sep 25, 2012 18:22 |
|
|
# ? May 28, 2024 01:44 |
|
Visual Studio 2012 question: In VS2010, when you opened a web project set to use IIS Express and the site wasn't mapped to that project, it would ask you if you wanted to remap it. In VS2012, it just automatically remaps it without asking. Is there some way to get the 2010 behavior back? I'm getting my site remapped without realizing it on a near daily basis, and it's really disruptive.
|
# ? Sep 25, 2012 18:47 |
|
Smugdog Millionaire posted:I'm trying to build the sequel to dotnetpad, dotnetrepl. It'd be a REPL for C#/VB using the Roslyn libraries. However, I'm running into a security issue. In future you should ask this sort of question in the Roslyn forums. That's where the Roslyn team members hang out (including Bill Chiles, who's in charge of the REPL experience). For this time I asked the REPL team directly. Here are the answers: * Roslyn currently depends on a few components that use pointers or P/Invokes: CCI metadata reader, CCI metadata writer, fusion, PDB writer and key container APIs. Until we replace them (or implement alternatives) we require full trust. Some of them could be avoided – CCI metadata writer and PDB writer is avoided using Ref.Emit. Key container APIs are avoided if your compilation doesn’t use key containers. The other components can’t at the moment. * Security-transparency hasn't been an important goal yet. Given the above list, it'll take a lot of effort (and a lot of evidence of user-demand...) * One idea: "One thing they can do as a workaround could be to expose compilation APIs from their host as security safe critical. That would mean that the transparent code in the domain could call these APIs that would then call, e.g. CompileSubmission, and returned back the Submission object to the transparent code. Then the transparent code could execute it. However I wouldn’t recommend it because we haven’t done any security review on Roslyn. Especially CCI, from my experience is very prone to integer overflows which might be exploited. So by exposing compilation APIs to transparent code one might open a security hole."
|
# ? Sep 25, 2012 19:19 |
|
ljw1004 posted:In future you should ask this sort of question in the Roslyn forums. That's where the Roslyn team members hang out (including Bill Chiles, who's in charge of the REPL experience). For this time I asked the REPL team directly. Here are the answers: Thanks for the information. I think the outlined approach is effectively what I'm trying to do: code:
Which works fine, until later when some MemoryMappedFile object gets garbage collected and tries to un-mmap whatever it's wrapping, at which point it needs full trust and can't get it. I tried doing something like code:
|
# ? Sep 25, 2012 19:45 |
|
Sup Goons, I'm building a portfolio website of all my work because my job pays me $12.50 an hour 20 hours a week to program software, program web, design web, computer troubleshooting, and manage a website. So... I figured it might be time to move onto greener pastures Anyway while I figure out what position I might be applying for, I'm trying to clean up some of my slightly older program code to conform with better practices I've learned since. Going back, I would have written this top function buttonParseProcommD2M_Click to work with an unlimited amount of systems by using sender, but I didn't. Barring that, does anyone see anything that screams "oh poo poo this is terrible!"? It runs wonderfully daily in a commercial environment, but I would like to move up a tier in the programming business if possible. (This is just 2 functions I used as a code sample, not the entire program (obviously...)) Formatting got a little screwed up, and I had add some return characters to stop it from breaking tables. code:
Knyteguy fucked around with this message at 21:31 on Sep 25, 2012 |
# ? Sep 25, 2012 21:03 |
|
You're doing a slightly strange mixture of using .Show() and .Hide() vs. directly setting .Visible, I don't see where you show the button after you hid it at the start of the click event, and for personal preference I'd set .Enabled to false rather than hiding the button; greying it out is more visually understandable as "okay, you can still use this, just not now" whereas things disappearing when you click them can be a little startling.
|
# ? Sep 25, 2012 21:20 |
|
CapnAndy posted:You're doing a slightly strange mixture of using .Show() and .Hide() vs. directly setting .Visible, I don't see where you show the button after you hid it at the start of the click event, and for personal preference I'd set .Enabled to false rather than hiding the button; greying it out is more visually understandable as "okay, you can still use this, just not now" whereas things disappearing when you click them can be a little startling. That's a great idea, I think I'll implement that thanks .
|
# ? Sep 25, 2012 21:28 |
|
epalm posted:Any book recommendations for MSMQ and/or WCF? No seriously, is anyone using MSMQ? If so, do you love it? If so, do you have a favourite MSMQ book?
|
# ? Sep 25, 2012 21:35 |
|
epalm posted:No seriously, is anyone using MSMQ? If so, do you love it? If so, do you have a favourite MSMQ book? I found it fairly straightforward to send and receive messages. What are you trying to do with it?
|
# ? Sep 25, 2012 22:08 |
|
Well I'm trying to read from remote queues and even with EVERYONE and ANONYMOUS_LOGON having full permissions I'm still getting Access Denied exceptions, and I had to resort to this registry hack to make it work. I'm not even sure I should be reading from remote queues. Sure I can walk in circles blindfolded until I read enough blog posts and stack overflow questions to make it work, but this needs to work in production and I want to set things up The Right Way instead of trying to fight with MSMQ every step of the way simply due to my ignorance. epswing fucked around with this message at 23:52 on Sep 25, 2012 |
# ? Sep 25, 2012 22:14 |
|
I don't know how set on MSMQ you are but I found RabbitMQ to be very straight forward and it has been rock solid from day 1.
|
# ? Sep 25, 2012 23:26 |
|
See if your server or client machine is configured to disallow unencrypted or low-encryption connections or otherwise have trust (e.g. they are in the same domain or trusted forest). This states that MSMQ tries to use an encrypted RPC channel, which will fail if the allowed encryption methods don't line up or there is not sufficient trust. You can also look at the problem a different way and see if you can configure message routing on the remote machine to send messages that you're interested in to your local machine.
|
# ? Sep 25, 2012 23:49 |
|
Knyteguy posted:Barring that, does anyone see anything that screams "oh poo poo this is terrible!"? I Yes. Do not submit this code to a potential employer as it is. Here's my short list, without digging into the actual functionality:
Question: Does your application even update the progress bar visually? You're blocking the UI thread as far as I can tell.
|
# ? Sep 26, 2012 01:16 |
|
Hibame posted:I don't know how set on MSMQ you are but I found RabbitMQ to be very straight forward and it has been rock solid from day 1. Interesting, I'll look into it. The Publish/Subscribe use case seems to be exactly what I want. i barely GNU her! posted:See if your server or client machine is configured to disallow unencrypted or low-encryption connections or otherwise have trust (e.g. they are in the same domain or trusted forest). I want to use message queues over the internet. My MSMQ options seem to be (A) use HTTP MSMQ, but this involves IIS and I don't think I want to introduce that dependency on client machines, or (B) use standard MSMQ and open 3 or 4 ports and hope it works. Again, I'm not a message queue expert, which is why I'm looking for a good book. The one thing I do know is that holding TCP sockets open between server and clients using hand rolled code is error prone (no built in buffering, reconnection logic, guaranteed delivery, transmission acknowledgements, transactions, etc). We're using a hand rolled solution now, and it needs work. Looking at the necessary development work, it seems to me that I'd be building a message queue, and heyooo, they already exist. epswing fucked around with this message at 01:48 on Sep 26, 2012 |
# ? Sep 26, 2012 01:42 |
|
I would try and avoid sending non-WAN protocols (raw MSMQ) over the WAN. HTTP, or some other wrapper, is probably a necessary evil. Now, you could do something like self-host the ASP.NET web API and pass messages to MSMQ. PS: just recalled one other option -- https://github.com/ayende/rhino-queues ; also self-hostable IIRC. Slightly dated but still solid. wwb fucked around with this message at 01:53 on Sep 26, 2012 |
# ? Sep 26, 2012 01:51 |
|
Unless I'm reading wrong I'm not seeing how you need IIS on the client, you should only need it on the server.
|
# ? Sep 26, 2012 03:26 |
|
Hibame posted:I don't know how set on MSMQ you are but I found RabbitMQ to be very straight forward and it has been rock solid from day 1. This. Also, I've been working on a rabbitmq library called Chinchilla (https://github.com/jonnii/chinchilla). It should help with the pub/sub stuff, it's a nuget package. There are better libraries out there, specifically easynetq (http://easynetq.com/) and masstransit (masstransit-project.com), but none of them fit my use case exactly. I highly recommend RabbitMQ over MSMQ. It's a superior product in every possible way.
|
# ? Sep 26, 2012 03:28 |
|
.
|
# ? Sep 26, 2012 03:42 |
|
Ithaqua posted:Yes. Do not submit this code to a potential employer as it is. Thanks I'll make some changes - I want it to be as well done as possible. MVC (this is MVC related right?) is something I've only briefly touched upon. It sounds like I should probably do some more reading on it and understand what it actually represents, and how to implement it correctly. Unit tests I've never done. I just found a basic tutorial for VS/C# so I'll look into this. Naming conventions... I'll read what the standard is. I'm certain I can learn this fairly quickly. Question: Does your application even update the progress bar visually? You're blocking the UI thread as far as I can tell. It does on this sample code. It doesn't in a second part of the program (which I've been meaning to fix for my co-worker in an update) that also uses a progress bar. I've gotten my feet wet with multi-threading/task parallel so it sounds like I should just update it in the program and the sample code. Thank you for the input .
|
# ? Sep 26, 2012 06:23 |
|
jonnii posted:I highly recommend RabbitMQ over MSMQ. It's a superior product in every possible way. Could anyone elaborate on this? We use MSMQ here, but mostly because it's just there by default, and I'd like to have some alternatives.
|
# ? Sep 26, 2012 15:12 |
|
GrumpyDoctor posted:I just got a chance to implement this, and the literal "put text in the text box" part works, but it's not updating the bound-to properties on my view model (the setter is never reached and nothing is changing). I'm clearly missing something about how data binding works. I see what you mean about the binding. I don't have time to figure out why but as a workaround you can force an update: C# code:
|
# ? Sep 26, 2012 16:39 |
|
Knyteguy posted:Thanks I'll make some changes - I want it to be as well done as possible. No. MVC is a pattern that can be applied to help with keeping your presentation logic separate. Read up on tiered architectures. In general, you have a presentation layer, an application logic layer, and a data layer. The data layer handles pulling your data from a source of some kind (a database, a spreadsheet, an XML file, whatever). The application layer applies business rules to the data and shapes it for display. The presentation layer actually handles displaying the data shaped by the application layer. That's very general, and it won't apply to all projects all the time.
|
# ? Sep 26, 2012 17:17 |
|
Munkeymon posted:Could anyone elaborate on this? We use MSMQ here, but mostly because it's just there by default, and I'd like to have some alternatives. To be honest they are two very different technologies. One is a message queue, the other is a message bus. I'll try to be as objective as possible, which is hard because of how much I dislike msmq, so here goes: MSMQ + Has really good integration with active directory + Uses built in windows security + Comes built in with windows + Supports message priorities + Has some great libraries around it to hide some of the warts (masstransit/nservicebus) + Has a way to do HA transactional/non-transactional clustering (if you can set it up) + Machine to machine queues - Permissions can be a pain to get right - Supports message priorities (lol lets make everything high priority) - Doesn't natively support pub/sub - Has message limits (i believe this was 4mb, now i dunno, might be higher now) - No easy way to see centrally how your queues are configured - Machine to machine queues - Competing consumers isn't supported out of the box RabbitMq + Easy to install + All messages go through a broker + Has great management plugins for interacting with the broker + Performance can be pretty astounding + Message TTLs + Topic based routing with exchanges/queues + Persistant and non-persistant messages + Moden C# API + Transient queues (if you need to do server/client (but don't do client/server over a message bus)) + Great wrapper libraries (masstransit/easynetq) - HA options are available, but you'll need to use your brain - You'll need install erlang - I don't think distributed transactions are supported out of the box Hopefully this was helpful. Let me know if you have any other questions.
|
# ? Sep 27, 2012 03:36 |
|
Sedro posted:I see what you mean about the binding. I don't have time to figure out why but as a workaround you can force an update: Great, thanks! And yeah, it was a framework exception.
|
# ? Sep 27, 2012 07:03 |
|
jonnii posted:RabbitMq
|
# ? Sep 27, 2012 11:48 |
|
Sagacity posted:Just curious: Why is this considered a plus? It would be a negative if the broker was a single point of failure, but you can run rabbitmq clustered/federated. I think it's a plus because you can see at a glance what your messaging topology is doing. That kind of insight is much harder when your queues are machine-machine.
|
# ? Sep 27, 2012 13:34 |
|
Maybe I'm using the wrong control for this, but I can't seem to figure out how to do something my boss wants. I've got a ListView and a ComboBox on a form. The ListView shows some products and prices. The price changes based on the currently selectd ComboBox value (which represents the quantity of products). Instead of having the ComboBox my boss just wants the ListView to be more... table like? I'm not sure how to describe it. Basically, say there's only 5 products listed, it would say "Price Tier 1" or something in the ListView, then print out all the items at their price, then "Price Tier 2" on another row, show the new price for that bracket etc. What I would *think* to do is simply put that text in one of the columns, set the background color to something different to section off the chunks. But I can't seem to figure out how to loop through the data and put it in the ListView multiple times like that. Also is it just me or would that be really loving ugly and bloated? As a user I wouldn't want to have to scroll through some massive list of products to find a particular price bracket.
|
# ? Sep 27, 2012 15:06 |
|
ListView sucks. Use DataGridView.
|
# ? Sep 27, 2012 15:39 |
|
jonnii posted:Hopefully this was helpful. Let me know if you have any other questions. That's helpful just because you pointed out that Masstransit works with MSMQ. Using a friendlier interface that allows us to easily swap out the back end would be a huge improvement. Do the RabbitMQ command line utilities let you check the status of any queue from any machine or do you have to be remoted into one of the brokers to get information out of them? We have some third party MSMQ browsing software that we use for that currently but it's still kind of a pain in the rear end.
|
# ? Sep 27, 2012 15:40 |
|
Dietrich posted:ListView sucks. Use DataGridView. This man speaks wisdom.
|
# ? Sep 27, 2012 15:42 |
|
Using some third party framework on top of .NET that doesn't integrate nicely with the Data Grids Suppose I could see if it'd be alright to say gently caress it and use the regular .NET one anyways. Is what he wanted even possible though, with the ListViews?
|
# ? Sep 27, 2012 16:01 |
|
Sab669 posted:Maybe I'm using the wrong control for this, but I can't seem to figure out how to do something my boss wants. But your final question is dead on. It sounds insanely ugly and bloated and is a really, really bad idea.
|
# ? Sep 27, 2012 17:32 |
|
I'm stumped, we're migrating a customer's site on to a new server with hugely higher specification than their previous. The only major change is that we've gone from 2 servers (1 hosting the site, the other the database) to 1 single server (with both IIS and SQL up). Site is .Net 4 MVC 3. OS, IIS and SQL versions are the same, just a lot more juice in the processor and memory department. However, the new server runs slower, a lot slower, like an extra 3 seconds on every page click. The old servers we're struggling at busy periods so we are wanting a server with a lot more beans, which this one certainly has, but I can't pin point the delay anywhere. SQL calls are coming back instantly, the processor/memory usage is minimal, we've got no permission problems that I can see. The only thing I can think of is if .Net is missing a configuration setting somewhere. I could understand it if there was some sloppy code, but the same code on two different servers is running completely differently?
|
# ? Sep 27, 2012 17:42 |
|
That really feels like something wonky is happening and the app pool is recycling on every request. Pretty easy to insturment that -- you just need to enable that logging. Request tracing could also shed some light on things. IIS7's is pretty fancy. I'd also look at the SQL trace utility for the app as it is running to see if there is a smoking gun there.
|
# ? Sep 27, 2012 18:05 |
|
Munkeymon posted:That's helpful just because you pointed out that Masstransit works with MSMQ. Using a friendlier interface that allows us to easily swap out the back end would be a huge improvement. A cautionary tale. We used to use masstransit with rabbit (never with msmq) and eventually switched away from it because the abstraction it provides doesn't expose some of the best features of rabbit like auto delete queues/exchanges, TTL etc... It's a good way to get started, but you might find yourself wanting more. To check the status of a queue you have a few options. 1. Management plugin (which is awesome). 2. Http API 3. rabbitmqctl command line tools list all the queues and some info >rabbitmqadmin list queues vhost name node messages message_stats.publish_details.rate
|
# ? Sep 28, 2012 00:39 |
|
Haha, what the gently caress. Just looking over this application, I noticed some random Radio button that was placed over one that is supposed to be there. Deleted it, there was another unnamed Radio Button underneath it. Delete that, there were all-in-all about 15 unused, generic radio buttons
|
# ? Sep 28, 2012 15:28 |
|
Unrelated to my response, I'm trying to make a (what I would think is) fairly simple XML transformation happen in a web.config for local debugging. web.config XML code:
XML code:
jonnii posted:A cautionary tale. We used to use masstransit with rabbit (never with msmq) and eventually switched away from it because the abstraction it provides doesn't expose some of the best features of rabbit like auto delete queues/exchanges, TTL etc... It's a good way to get started, but you might find yourself wanting more. That'd be fine since we only use MSMQ now. Anything to make it less annoying would be great. Munkeymon fucked around with this message at 17:52 on Sep 28, 2012 |
# ? Sep 28, 2012 17:48 |
|
I've got it stuck in my head to learn how to do matrix multiplication in a few different languages. I'm having some trouble with F# (which I am also learning):code:
|
# ? Sep 29, 2012 22:58 |
|
Bozart posted:I've got it stuck in my head to learn how to do matrix multiplication in a few different languages. I'm having some trouble with F# (which I am also learning): Check this out: http://msdn.microsoft.com/en-us/library/hh304369(v=vs.100).aspx
|
# ? Sep 29, 2012 23:12 |
|
|
# ? May 28, 2024 01:44 |
|
Since the OP hasn't been updated in 3 years, are there any new recommended books for people looking to pick up C# as a first language?
|
# ? Sep 29, 2012 23:34 |