text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
error about 2 hours ago. Same exact symptoms, same exact culprit write. The truly strange thing is that the locking write SQL statement you see above is part of a very specific code path. It's *only* executed when a new answer is added to a question -- it updates the parent question with the new answer count and last date/user. This is, obviously, not that common relative to the massive number of reads we are doing! As far as I can tell, we're not doing huge numbers of writes anywhere in the app. I realize that NOLOCK is sort of a giant
[ 0.3354145288467407, 0.3236455023288727, 0.30199864506721497, 0.17279697954654694, 0.14661747217178345, -0.12059780210256577, 0.6200103163719177, 0.35812637209892273, -0.33008694648742676, -0.27477964758872986, 0.23473142087459564, 0.3430960476398468, -0.27998217940330505, 0.349658727645874...
hammer, but most of the queries we run here don't need to be that accurate. Will you care if your user profile is a few seconds out of date? Using NOLOCK with Linq is a bit more difficult as [Scott Hanselman discusses here](http://www.hanselman.com/blog/GettingLINQToSQLAndLINQToEntitiesToUseNOLOCK.aspx). We are flirting with the idea of using ``` SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ``` on the base database context so that all our LINQ queries have this set. Without that, we'd have to wrap every LINQ call we make (well, the simple reading ones, which is the vast majority of them) in a 3-4 line transaction code block, which is ugly. I
[ 0.28332066535949707, 0.4839961528778076, 0.1056383028626442, 0.009699511341750622, -0.11912629008293152, -0.32984739542007446, 0.34927403926849365, -0.30178508162498474, -0.47993287444114685, -0.1682305932044983, 0.30074411630630493, 0.7706589102745056, -0.17176522314548492, -0.01270613819...
guess I'm a little frustrated that trivial reads in SQL 2005 can deadlock on writes. I could see write/write deadlocks being a huge issue, but *reads?* We're not running a banking site here, we don't need perfect accuracy every time. Ideas? Thoughts? --- > Are you instantiating a new LINQ to SQL DataContext object for every operation or are you perhaps sharing the same static context for all your calls? Jeremy, we are sharing one static datacontext in the base Controller for the most part: ``` private DBContext _db; /// <summary> /// Gets the DataContext to be used by a Request's controllers. /// </summary> public DBContext DB {
[ 0.16659793257713318, 0.17291474342346191, 0.19896920025348663, 0.14018508791923523, -0.3609935939311981, -0.07680702954530716, 0.09157302975654602, -0.10013142973184586, -0.021243209019303322, -0.4498372972011566, 0.36909446120262146, 0.35582369565963745, -0.3134482800960541, 0.07267786562...
get { if (_db == null) { _db = new DBContext() { SessionName = GetType().Name }; //_db.ExecuteCommand("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED"); } return _db; } } ``` Do you recommend we create a new context for every Controller, or per Page, or .. more often? According to
[ 0.19319824874401093, -0.15907806158065796, 0.5071671009063721, 0.12814076244831085, 0.1323896199464798, -0.24125365912914276, 0.17945075035095215, -0.2172503024339676, -0.07649269700050354, -0.7892400622367859, -0.18315564095973969, 0.42680954933166504, -0.4130631983280182, 0.1789721995592...
MSDN: <http://msdn.microsoft.com/en-us/library/ms191242.aspx> > When either the > READ COMMITTED SNAPSHOT or > ALLOW SNAPSHOT ISOLATION database > options are ON, logical copies > (versions) are maintained for all data > modifications performed in the > database. Every time a row is modified > by a specific transaction, the > instance of the Database Engine stores > a version of the previously committed > image of the row in tempdb. Each > version is marked with the transaction > sequence number of the transaction > that made the change. The versions of > modified rows are chained using a link > list. The
[ -0.15050090849399567, -0.1449698954820633, 0.5759408473968506, 0.0010845435317605734, -0.0045245918445289135, 0.1313340812921524, -0.030006911605596542, -0.25110551714897156, -0.5683969855308533, -0.919724702835083, -0.383756160736084, 0.3593665063381195, -0.54075688123703, 0.2360752224922...
newest row value is always > stored in the current database and > chained to the versioned rows stored > in tempdb. > > > For short-running transactions, a > version of a modified row may get > cached in the buffer pool without > getting written into the disk files of > the tempdb database. If the need for > the versioned row is short-lived, it > will simply get dropped from the > buffer pool and may not necessarily > incur I/O overhead. There appears to be a slight performance penalty for the extra overhead, but it may be negligible.
[ -0.19691598415374756, -0.09270124137401581, 0.8758753538131714, -0.031574565917253494, 0.2031267136335373, -0.21858765184879303, 0.0355648472905159, -0.2891254127025604, -0.24843144416809082, -0.8000010848045349, -0.19475580751895905, 0.28110796213150024, -0.3395817279815674, 0.26375561952...
We should test to make sure. Try setting this option and REMOVE all NOLOCKs from code queries unless it’s really necessary. NOLOCKs or using global methods in the database context handler to combat database transaction isolation levels are Band-Aids to the problem. NOLOCKS will mask fundamental issues with our data layer and possibly lead to selecting unreliable data, where automatic select / update row versioning appears to be the solution. ``` ALTER Database [StackOverflow.Beta] SET READ_COMMITTED_SNAPSHOT ON ```
[ 0.2021254301071167, 0.30216893553733826, 0.32401910424232483, 0.17473819851875305, 0.37761199474334717, -0.3373580276966095, 0.22335240244865417, -0.06232080236077309, -0.3705154061317444, -0.37639865279197693, -0.31472551822662354, 0.49961164593696594, -0.4541144371032715, 0.0971895307302...
I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord? *Later:* I appreciate all the suggestions to use other databases, but trust me: I've tried convincing them. There is an "approved" list, and no SQL databases are on it. Getting something onto the list could take more than a year, and this project will be done in three weeks. It's a long shot but there's an [ODBC adapter for ActiveRecord](http://odbc-rails.rubyforge.org/) that might work.
[ 0.49711549282073975, 0.05661686509847641, 0.25675132870674133, 0.20568248629570007, 0.152121439576149, -0.06685494631528854, 0.5525319576263428, 0.27148810029029846, -0.11770288646221161, -0.7954617142677307, 0.049470771104097366, 0.5445639491081238, 0.293457567691803, 0.09293243288993835,...
I am maintaining a few web applications. The development and qa environments use invalid/outdated ssl-certificates. Although it is generally a good thing, that Firefox makes me click like a dozen times to accept the certificate, this is pretty annoying. Is there a configuration-parameter to make Firefox (and possibly IE too) accept any ssl-certificate? EDIT: I have accepted the solution, that worked. But thanks to all the people that have advised to use self-signed certificates. I am totally aware, that the accepted solution leaves me with a **gaping security hole**. Nonetheless I am to lazy to change the certificate for all the applications and
[ 0.5409165620803833, 0.5023792386054993, 0.3923299312591553, -0.01254330761730671, 0.06604921817779541, -0.31960463523864746, 0.6111270189285278, 0.13512539863586426, -0.08619718998670578, -0.5644165277481079, -0.07209260761737823, 0.43311160802841187, -0.1564270406961441, 0.175294429063797...
all the environments... But I also advice anybody strongly to leave validation enabled! Go to Tools > Options > Advanced "Tab"(?) > Encryption Tab Click the "Validation" button, and uncheck the checkbox for checking validity Be advised though that this is pretty unsecure as it leaves you wide open to accept any invalid certificate. I'd only do this if using the browser on an Intranet where the validity of the cert isn't a concern to you, or you aren't concerned in general.
[ 0.471747487783432, 0.40898576378822327, 0.40708521008491516, 0.018957151100039482, -0.1341400444507599, -0.5878928303718567, 0.5576232671737671, 0.0029651992954313755, -0.0998343750834465, -0.3693295419216156, -0.14089412987232208, 0.5934249758720398, -0.04366498813033104, -0.0339093357324...
This line in YUI's [Reset CSS](http://developer.yahoo.com/yui/reset/) is causing trouble for me: ```css address,caption,cite,code,dfn,em,strong,th,var { font-style: normal; font-weight: normal; } ``` It makes my `em` not italic and my `strong` not bold. Which is okay. I know how to override that in my own stylesheet. ```css strong, b { font-weight: bold; } em, i { font-style: italic; } ``` The problem comes in when I have text that's both `em` and `strong`. ``` <strong>This is bold, <em>and this is italic, but not bold</em></strong> ``` My rule for `strong` makes it bold, but YUI's rule for `em` makes it normal again. How do I fix that? If your strong declaration
[ -0.09648703038692474, 0.03852017968893051, 0.3238217830657959, -0.24817459285259247, -0.4064438045024872, 0.2835102081298828, 0.46035563945770264, 0.016629165038466454, 0.005806310102343559, -0.45305103063583374, -0.181386798620224, 0.46791648864746094, -0.19831536710262299, 0.080294154584...
comes after YUI's yours should override it. You can force it like this: ``` strong, b, strong *, b * { font-weight: bold; } em, i, em *, i * { font-style: italic; } ``` If you still support IE7 you'll need to add `!important`. ``` strong, b, strong *, b * { font-weight: bold !important; } em, i, em *, i * { font-style: italic !important; } ``` This works - see for yourself: ```css /*YUI styles*/ address,caption,cite,code,dfn,em,strong,th,var { font-style: normal; font-weight: normal; } /*End YUI styles =*/ strong, b, strong *, b * { font-weight: bold; } em, i, em *, i * { font-style: italic; } ``` ```html <strong>Bold</strong> - <em>Italic</em> - <strong>Bold and
[ -0.17596843838691711, -0.12502284348011017, 0.904473602771759, -0.21476447582244873, -0.40612557530403137, 0.2204563468694687, 0.10379128903150558, -0.30744847655296326, 0.20295493304729462, -0.5977386236190796, -0.45645323395729065, 0.6916210651397705, 0.03107631206512451, -0.341549009084...
<em>Italic</em></strong> ```
[ -0.044518083333969116, 0.3970346748828888, 0.41013583540916443, -0.2688682973384857, -0.4232921600341797, 0.48828208446502686, 0.46095192432403564, 0.054861631244421005, -0.23043370246887207, -0.7109269499778748, -0.4437924921512604, 0.036772470921278, -0.399591863155365, -0.04680398851633...
Is there an easy way in C# to create [Ordinals](http://en.wikipedia.org/wiki/Ordinal_numbers_%28linguistics%29) for a number? For example: * 1 returns 1st * 2 returns 2nd * 3 returns 3rd * ...etc Can this be done through `String.Format()` or are there any functions available to do this? This page gives you a complete listing of all custom numerical formatting rules: [Custom numeric format strings](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings) As you can see, there is nothing in there about ordinals, so it can't be done using `String.Format`. However its not really that hard to write a function to do it. ``` public static string AddOrdinal(int num) { if( num <= 0 ) return num.ToString();
[ 0.04031787067651749, -0.05064407363533974, 0.42421987652778625, -0.031116431578993797, -0.17082977294921875, 0.021428100764751434, -0.0418861024081707, -0.1273852288722992, -0.2377816140651703, -0.12056237459182739, 0.01007858756929636, 0.5348164439201355, -0.22797471284866333, -0.11120293...
switch(num % 100) { case 11: case 12: case 13: return num + "th"; } switch(num % 10) { case 1: return num + "st"; case 2:
[ 0.17300333082675934, -0.19184479117393494, 0.14790478348731995, -0.16953213512897491, -0.046419452875852585, 0.4445374608039856, 0.09121280908584595, -0.17623332142829895, 0.11026468873023987, -0.5205224752426147, -0.17008541524410248, 0.597859799861908, -0.049534447491168976, 0.1083045154...
return num + "nd"; case 3: return num + "rd"; default: return num + "th"; } } ``` Update: Technically Ordinals don't exist for <= 0, so I've updated the code above. Also removed the redundant `ToString()` methods. Also note, this is not internationalized. I've no idea what ordinals look like in other languages.
[ -0.026513000950217247, -0.016266878694295883, 0.05094974488019943, -0.26493382453918457, -0.09977520257234573, -0.14193031191825867, 0.22364848852157593, -0.05667632818222046, -0.1604221612215042, -0.186433345079422, -0.24793601036071777, 0.6073427796363831, -0.09124616533517838, 0.0302737...
I have a collection of classes that inherit from an abstract class I created. I'd like to use the abstract class as a factory for creating instances of concrete implementations of my abstract class. Is there any way to hide a constructor from all code except a parent class. I'd like to do this basically ``` public abstract class AbstractClass { public static AbstractClass MakeAbstractClass(string args) { if (args == "a") return new ConcreteClassA();
[ 0.33023887872695923, -0.0346023254096508, -0.0315299853682518, -0.3767775297164917, 0.11402998864650726, 0.015089399181306362, 0.4662353992462158, -0.27796757221221924, -0.1933964341878891, -0.38443803787231445, 0.10996855050325394, 0.4818897545337677, -0.5373415946960449, 0.40411075949668...
if (args == "b") return new ConcreteClassB(); } } public class ConcreteClassA : AbstractClass { } public class ConcreteClassB : AbstractClass { } ``` But I want to prevent anyone from directly instantiating the 2 concrete classes. I want to ensure that only the MakeAbstractClass() method can instantiate the base classes. Is there any way to do this? **UPDATE** I don't need to access any specific methods of ConcreteClassA or B from outside of the Abstract class. I only need the public methods my Abstract class provides. I don't really need to prevent the
[ 0.24076113104820251, -0.020047027617692947, 0.08077114820480347, -0.372451514005661, -0.10270202159881592, -0.22429075837135315, 0.5357926487922668, -0.09032106399536133, -0.14319837093353271, -0.42662984132766724, 0.04110107570886612, 0.4802030920982361, -0.6321899890899658, 0.11905620992...
Concrete classes from being instantiated, I'm just trying to avoid it since they provide no new public interfaces, just different implementations of some very specific things internal to the abstract class. To me, the simplest solution is to [make child classes as samjudson mentioned](https://stackoverflow.com/questions/20185/is-there-a-way-to-make-a-constructor-only-visible-to-a-parent-class-in-c#20200). I'd like to avoid this however since it would make my abstract class' file a lot bigger than I'd like it to be. I'd rather keep classes split out over a few files for organization. I guess there's no easy solution to this... You can make the sub classes child classes, something like this: ``` public abstract class AbstractClass {
[ -0.0299962367862463, 0.11673181504011154, -0.24921095371246338, 0.056657109409570694, -0.17684774100780487, 0.09597852826118469, 0.281650573015213, 0.0704890787601471, -0.35103484988212585, -0.35769355297088623, -0.0266782995313406, 0.1511298269033432, -0.24489857256412506, 0.1928256899118...
public static AbstractClass MakeAbstractClass(string args) { if (args == "a") return new ConcreteClassA(); if (args == "b") return new ConcreteClassB(); } private class ConcreteClassA : AbstractClass { } private class ConcreteClassB : AbstractClass { } } ``` [@Vaibhav](https://stackoverflow.com/questions/20185/is-there-a-way-to-make-a-constructor-only-visible-to-a-parent-class-in-c#20220) This does indeed mean
[ -0.046570878475904465, -0.06705895066261292, 0.3240780830383301, -0.2498418688774109, 0.049959052354097366, -0.12079494446516037, 0.47530022263526917, 0.027388306334614754, -0.4201889634132385, -0.3828245997428894, -0.3581301271915436, 0.29825568199157715, -0.3887671232223511, 0.2434284538...
that the classes are also hidden. But this is as far as I am aware the only way to completely hide the constructor. Edit: As others have mentioned the same thing can be accomplished using Reflection, which might actually be closer to what you would like to be the case - for example the above method replies on the concrete classes being inside the same file as the Abstract class, which probably isn't very convenient. Having said that this way is a nice 'Hack', and good if the number and complexity of the concrete classes is low.
[ 0.5758343935012817, -0.030667737126350403, -0.20955441892147064, 0.2202354371547699, -0.28530025482177734, -0.22646217048168182, 0.49497634172439575, 0.16921985149383545, -0.11810034513473511, -0.49027910828590393, 0.08008700609207153, 0.6818080544471741, -0.08880677819252014, 0.0798567086...
I thought .Net code gets compiled into MSIL, so I always wondered how do Yellow Screens produce the faulty code. If it's executing the compiled code, how is the compiler able to produce code from the source files in the error message? Feel free to edit this question/title, I know it doesn't really make sense. A .Net assembly is compiled with metadata about the bytecode included that allows easy decompilation of the code - that's how tools like [.Net Reflector](http://www.red-gate.com/products/reflector/) work. The PDB files are debug symbols only - the difference in the Yellow Screen Of Death is that you'll get line
[ 0.44994527101516724, -0.0292215533554554, 0.18701426684856415, 0.04690543934702873, -0.13909387588500977, 0.008887029252946377, 0.3054659962654114, -0.06279347836971283, -0.16141743957996368, -0.5803569555282593, -0.006704007741063833, 0.40336844325065613, -0.285509318113327, 0.18590697646...
numbers in the stack trace. In other words, you'd get the code, even if the PDB files were missing.
[ 0.33705031871795654, -0.11457635462284088, 0.19474853575229645, 0.3123632073402405, 0.20451679825782776, -0.28534987568855286, -0.08650558441877365, -0.17975181341171265, -0.7616444826126099, -0.2733420431613922, 0.017308920621871948, 0.3106553852558136, 0.03364086523652077, -0.22329331934...
I'm packaging up a .NET 2.0 based web app for deployment through a Windows Installer based package. Our app uses Report Viewer 2008 and I'm including the Microsoft Report Viewer Redistributable 2008 installer. When I check the [download page for Report Viewer 2008](http://www.microsoft.com/downloads/details.aspx?FamilyID=cc96c246-61e5-4d9e-bb5f-416d75a1b9ef&DisplayLang=en "Microsoft Report Viewer Redistributable 2008 Download"), it lists .NET 3.5 as a requirement. Is having .Net 3.5 installed really needed Report Viewer 2008? We targeted .Net 2.0 for our app, there isn't anything in our code that would use the 3.0 or 3.5 Frameworks. We are in the middle of testing and everything seems to be working with
[ 0.4417649209499359, 0.046416234225034714, 0.3405848741531372, 0.019042953848838806, -0.12396649271249771, -0.3120693862438202, 0.13166865706443787, -0.39374661445617676, -0.06023455783724785, -0.7080960273742676, 0.021145209670066833, 0.4689136743545532, -0.24723514914512634, 0.08873602002...
out 3.5, but I don't want to miss an edge condition and cause an error for a customer because he was missing a prerequisite run time package. So far testing with or with out the .NET Framework works as expected. My installer has the user install version 2.0 of the Framework and everything works as expected. My concern is that 3.5 is listed as a prerequisite on the Report Viewer download page.
[ 0.13474784791469574, 0.09061431139707565, 0.495022714138031, -0.2844957113265991, -0.1718578338623047, -0.4518739581108093, 0.522434413433075, -0.37286752462387085, 0.1202237606048584, -0.5935854315757751, -0.05483652651309967, 0.7327668070793152, -0.18518969416618347, -0.15376076102256775...
I've found out how to convert errors into exceptions, and I display them nicely if they aren't caught, but I don't know how to log them in a useful way. Simply writing them to a file won't be useful, will it? And would you risk accessing a database, when you don't know what caused the exception yet? I really like [log4php](http://logging.apache.org/log4php/) for logging, even though it's not yet out of the incubator. I use log4net in just about everything, and have found the style quite natural for me. With regard to system crashes, you can log the error to multiple destinations (e.g.,
[ 0.43167632818222046, 0.337764173746109, -0.10773025453090668, 0.23353801667690277, -0.008853808976709843, -0.09344737976789474, 0.5271925926208496, 0.12922246754169464, -0.5565539002418518, -0.51601243019104, 0.19542856514453888, 0.24153833091259003, -0.14299404621124268, -0.03479259088635...
have appenders whose threshold is CRITICAL or ERROR that only come into play when things go wrong). I'm not sure how fail-safe the existing appenders are--if the database is down, how does that appender fail?--but you could quite easily write your own appender that will fail gracefully if it's unable to log.
[ 0.25092431902885437, 0.13021959364414215, 0.08150269836187363, 0.5048567652702332, 0.19967491924762726, -0.004611188545823097, 0.332034707069397, 0.001853392575867474, -0.12874504923820496, -0.6014035940170288, 0.0888618677854538, 0.448524534702301, -0.3937014937400818, 0.11427537351846695...
I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are typically set to 0, but will sometimes be 0x7c0. What about the other hardware registers? > This early execution environment is highly implementation defined, meaning the implementation of your particular BIOS. Never make any assumptions on the contents of registers. They might be initialized to 0, but they might contain a random value
[ 0.4284802973270416, 0.05571798235177994, 0.09679516404867172, 0.11055229604244232, 0.2640697658061981, 0.09863106906414032, 0.18905533850193024, 0.04982989653944969, -0.1317005455493927, -0.606067419052124, 0.08325255662202835, 0.6155149936676025, -0.13680227100849152, -0.03325514495372772...
just as well. from the [OS dev Wiki](http://wiki.osdev.org/Boot_sequence), which is where I get information when I'm playing with my toy OS's
[ 0.44208383560180664, -0.08512718230485916, 0.14929276704788208, 0.4451470673084259, 0.3219272494316101, -0.07138577103614807, -0.0015554300043731928, 0.43938401341438293, -0.33368054032325745, -0.37522998452186584, -0.1055237278342247, 0.6696993112564087, 0.10324152559041977, 0.12317196279...
What are all the possible ways in which we can get memory leaks in .NET? I know of two: 1. Not properly un-registering [Event Handlers/Delegates](http://diditwith.net/PermaLink,guid,fcf59145-3973-468a-ae66-aaa8df9161c7.aspx). 2. Not disposing dynamic child controls in Windows Forms: Example: ``` // Causes Leaks Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label); // Correct Code Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label); label.Dispose(); ``` **Update**: The idea is to list common pitfalls which are not too obvious (such as the above). Usually the notion is that memory leaks are not a big problem because of the garbage collector. Not like it used to be in C++. --- Great
[ 0.24803034961223602, -0.008919067680835724, -0.08848431706428528, 0.229130819439888, 0.2638874053955078, -0.23947495222091675, 0.43787482380867004, -0.19138430058956146, -0.38231125473976135, -0.7361708879470825, -0.20031772553920746, 0.3707587718963623, -0.46871769428253174, 0.40456596016...
discussion guys, but let me clarify... by definition, if there is no reference left to an object in .NET, it will be Garbage Collected at some time. So that is not a way to induce memory leaks. In the managed environment, I would consider it a memory leak if you had an unintended reference to any object that you aren't aware of (hence the two examples in my question). **So, what are the various possible ways in which such a memory leak can happen?** Block the finalizer thread. No other objects will be garbage collected until the finalizer thread is unblocked. Thus the
[ 0.502805769443512, 0.0975431352853775, -0.03880522400140762, 0.25684329867362976, -0.2805516719818115, -0.6651677489280701, 0.3353308439254761, 0.39149704575538635, -0.5174862742424011, -0.4991582930088043, -0.06973323225975037, 0.5151047706604004, -0.17721794545650482, 0.23759301006793976...
amount of memory used will grow and grow. Further reading: <http://dotnetdebug.net/2005/06/22/blocked-finalizer-thread/>
[ 0.024922873824834824, -0.4873272776603699, 0.7821080088615417, -0.08271901309490204, 0.3221830129623413, 0.09759150445461273, 0.23248034715652466, 0.2744709253311157, -0.5844260454177856, -0.6157294511795044, 0.04786904528737068, 0.1406007558107376, -0.3813583254814148, 0.19800522923469543...
I'm developing an Excel 2007 add-in using Visual Studio Tools for Office (2008). I have one sheet with several ListObjects on it, which are being bound to datatables on startup. When they are bound, they autosize correctly. The problem comes when they are re-bound. I have a custom button on the ribbon bar which goes back out to the database and retrieves different information based on some criteria that the user inputs. This new data comes back and is re-bound to the ListObjects - however, this time they are not resized and I get an exception: > ListObject cannot be bound because
[ -0.10756487399339676, -0.027063114568591118, 0.4382283091545105, 0.016590943560004234, -0.13290438055992126, 0.04123583063483238, -0.07575705647468567, -0.3391641676425934, -0.36002883315086365, -0.6856508851051331, 0.07769548147916794, 0.5020403265953064, -0.43837034702301025, -0.06127109...
it > cannot be resized to fit the data. The > ListObject failed to add new rows. > This can be caused because of > inability to move objects below of the > list object. > > > > > Inner exception: "Insert method of Range class failed" > > > > Reason: Microsoft.Office.Tools.Excel.FailureReason.CouldNotResizeListObject I was not able to find anything very meaningful on this error on Google or MSDN. I have been trying to figure this out for a while, but to no avail. Basic code structure: ``` //at startup DataTable tbl = //get from database listObj1.SetDataBinding(tbl); DataTable tbl2 = //get from database listObj2.SetDataBinding(tbl2); //in
[ -0.14460740983486176, -0.048404209315776825, 0.3018041253089905, -0.12590548396110535, 0.06935278326272964, -0.04461728036403656, 0.5820626020431519, -0.18234366178512573, 0.11042652279138565, -0.890125036239624, -0.2886185050010681, 0.37925830483436584, -0.48312926292419434, 0.23572456836...
buttonClick event handler DataTable tbl = //get different info from database //have tried with and without unbinding old source listObj1.SetDataBinding(tbl); <-- exception here DataTable tbl2 = //get different info from database listObj2.SetDataBinding(tbl2); ``` Note that this exception occurs even when the ListObject is shrinking, and not only when it grows. If anyone else is having this problem, I have found the cause of this exception. ListObjects will automatically re-size on binding, as long as they do not affect any other objects on the sheet. Keep in mind that ListObjects can only affect the Ranges which
[ -0.13434039056301117, -0.2735048234462738, 0.3794022798538208, -0.09911134093999863, -0.09076446294784546, -0.0930338054895401, 0.3492776155471802, -0.2618042826652527, -0.6788574457168579, -0.4904550015926361, -0.05976404994726181, 0.27248072624206543, -0.6365383267402649, 0.0775336772203...
they wrap around. In my case, the list object which was above the other one had fewer columns than the one below it. Let's say the top ListObject had 2 columns, and the bottom ListObject had 3 columns. When the top ListObject changed its number of rows, it had no ability to make any changes to the third column since it wasn't in it's underlying Range. This means that it couldn't shift any cells in the third column, and so the second ListObject couldn't be properly moved, resulting in my exception above. Changing the positions of the ListObjects to place the wider
[ -0.1948867291212082, -0.08469008654356003, 0.41534820199012756, -0.034890178591012955, -0.47792619466781616, 0.12068663537502289, 0.23643766343593597, -0.23442421853542328, -0.7356140613555908, -0.4183023273944855, -0.21278510987758636, -0.24044443666934967, -0.47985607385635376, 0.2132937...
one above the smaller one works fine. Following the logic above, this now means that the wider ListObject can shift all of the columns of the second ListObject, and since there is nothing below the smaller one it can also shift any cells necessary. The reason I wasn't having any trouble on the initial binding is that both ListObjects were a single cell. Since this is not optimal in my case, I will probably use empty columns or try to play around with invisible columns if that's possible, but at least the cause is now clear.
[ -0.06068053096532822, -0.26157352328300476, 0.39519640803337097, -0.2067003697156906, -0.3636019825935364, -0.023183370009064674, -0.008633733727037907, -0.399177610874176, -0.42166024446487427, -0.6807576417922974, 0.16968920826911926, 0.2157629430294037, -0.5834951400756836, 0.0677104890...
I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am currently doing this by exposing the following JavaScript method: ``` function doScript(js){ eval(js);} ``` I can then do something like this in Flex (note: I am doing something more substantial then an alert box in the real Flex app): ``` ExternalInterface.call("doScript","alert('foo')); ``` My question is does this impose any security risk, I am assuming it's not since the Flex and JasvaScript all run client side... Is there a better
[ 0.44833803176879883, 0.017456622794270515, 0.21055418252944946, -0.28747889399528503, -0.18170684576034546, -0.3026176989078522, 0.2014208734035492, -0.29112040996551514, -0.16258642077445984, -0.7947154641151428, -0.09075625240802765, 0.9682555198669434, -0.31626102328300476, -0.204345107...
way to do this? There's no need for the JavaScript function, the first argument to `ExternalInterface` can be any JavaScript code, it doesn't have to be a function name (the documentation says so, but it is wrong). Try this: ``` ExternalInterface.call("alert('hello')"); ```
[ 0.04330967366695404, 0.09601806104183197, 0.4016220271587372, -0.24281947314739227, -0.015895862132310867, -0.21796567738056183, 0.2311404049396515, -0.19540394842624664, -0.045718900859355927, -0.5520644783973694, -0.05598750710487366, 0.8309224843978882, -0.5138764977455139, 0.0543152429...
The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says: **The node to be removed is not a child of this node.** Does anyone know the proper way to do this? ``` public void DeleteProject (string projectName) { string ccConfigPath = ConfigurationManager.AppSettings["ConfigPath"]; XmlDocument configDoc = new XmlDocument(); configDoc.Load(ccConfigPath); XmlNodeList projectNodes = configDoc.GetElementsByTagName("project"); for (int i = 0; i < projectNodes.Count; i++) { if (projectNodes[i].Attributes["name"] != null)
[ 0.07975520938634872, -0.12505106627941132, 0.6620686054229736, 0.021431459113955498, 0.27588313817977905, -0.2597631812095642, 0.14862413704395294, -0.3182790279388428, -0.28807342052459717, -0.5552921295166016, -0.5128471255302429, 0.35579782724380493, -0.4856358766555786, 0.1374463289976...
{ if (projectName == projectNodes[i].Attributes["name"].InnerText) { configDoc.RemoveChild(projectNodes[i]);
[ -0.08996638655662537, -0.15604250133037567, 0.056511081755161285, -0.3249054551124573, 0.4309074282646179, -0.16571947932243347, 0.46121299266815186, -0.07807949930429459, 0.31891536712646484, -0.43950843811035156, -0.3221130073070526, 0.6378785371780396, -0.22171802818775177, 0.2921335101...
configDoc.Save(ccConfigPath); } } } } ``` **UPDATE** Fixed. I did two things: ``` XmlNode project = configDoc.SelectSingleNode("//project[@name='" + projectName + "']"); ``` Replaced the For loop with an XPath query, which wasn't for fixing it, just because it was a better approach. The actual fix was: ``` project.ParentNode.RemoveChild(project); ``` Thanks Pat and Chuck for this suggestion. Instead of ``` configDoc.RemoveChild(projectNodes[i]); ``` try ``` projectNodes[i].parentNode.RemoveChild(projectNodes[i]); ```
[ -0.07408889383077621, -0.08293870836496353, 0.34036359190940857, -0.08460176736116409, 0.05667570233345032, -0.23593959212303162, 0.151713028550148, 0.11096757650375366, -0.1539977490901947, -0.583354651927948, -0.09480559080839157, 0.6170676350593567, -0.6246004700660706, 0.16179403662681...
[AOP](http://en.wikipedia.org/wiki/Aspect-oriented_programming) is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you think it's rather a niche technology that won't be around for a long time or won't make it into the mainstream (like OOP did, at least in theory ;))? If you do use AOP then please let us know which tools you use as well. Thanks! Yes. Orthogonal concerns, like security, are best done with AOP-style interception. Whether
[ 0.30082419514656067, -0.21347810328006744, 0.1177159994840622, 0.20076927542686462, -0.17717954516410828, -0.12655451893806458, -0.12740248441696167, 0.11866339296102524, -0.45478594303131104, -0.504443347454071, -0.3083517849445343, 0.4865102469921112, -0.26962000131607056, -0.57015049457...
that is done automatically (through something like a dependency injection container) or manually is unimportant to the end goal. One example: the "before/after" attributes in [xUnit.net](http://www.codeplex.com/xunit) (an open source project I run) are a form of AOP-style method interception. You decorate your test methods with these attributes, and just before and after that test method runs, your code is called. It can be used for things like setting up a database and rolling back the results, changing the security context in which the test runs, etc. Another example: the filter attributes in [ASP.NET MVC](http://www.asp.net/mvc) also act like specialized AOP-style method interceptors. One,
[ 0.6816573143005371, -0.24779735505580902, 0.025625105947256088, 0.08104076981544495, -0.01450282335281372, -0.41301921010017395, 0.14429709315299988, -0.2531476616859436, -0.2951335608959198, -0.5284817218780518, -0.020852968096733093, 0.4142358899116516, -0.2154167890548706, 0.03824451193...
for instance, allows you to say how unhandled errors should be treated, if they happen in your action method. Many dependency injection containers, including Castle Windsor and Unity, support this behavior either "in the box" or through the use of extensions.
[ 0.11049630492925644, -0.1461133062839508, -0.3711600601673126, -0.10450291633605957, 0.07512087374925613, -0.11549562960863113, 0.2746303975582123, -0.13735267519950867, -0.059715867042541504, -0.14456932246685028, -0.22087900340557098, 0.6936023235321045, -0.4595339596271515, -0.218632072...
I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in the database. This is helpful in databinding situations where you can set the MaxLength property on a textbox, for example, to limit the length of input entered by the user. I cannot find a way using Linq to SQL to obtain the length of an underlying data column. Does anyone
[ 0.3010958135128021, 0.07592137157917023, 0.5281137824058533, 0.2202550321817398, -0.04355551302433014, -0.1633899211883545, -0.14694668352603912, -0.09424690902233124, -0.5122942328453064, -0.33205392956733704, 0.4105956554412842, 0.4917437434196472, -0.03658665716648102, 0.067321091890335...
know of a way to do this? Help please. Using the LINQ ColumnAttribute to Get Field Lengths from your Database : <http://www.codeproject.com/KB/cs/LinqColumnAttributeTricks.aspx>
[ 0.4061685800552368, 0.008806128986179829, 0.32356223464012146, 0.09842588007450104, 0.11750409752130508, -0.09068142622709274, -0.0010301421862095594, -0.16035187244415283, -0.3259164094924927, -0.3606431484222412, 0.042195726186037064, 0.08322487026453018, -0.15840570628643036, -0.0475727...
I want to test the behavior of a certain piece of .NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs. @Nick: Thanks for the reply. Alas, the tool in question is explicitly for unmanaged code. I didn't say "managed" in my question, and should not have assumed that people would infer it from the ".NET" tag. This is an excellent question, especially from a TDD point of view and validating code under different trust scenarios. I think the way I'd approach this would be
[ 0.45671460032463074, 0.14191530644893646, -0.026575950905680656, 0.6285682320594788, -0.024393506348133087, -0.14569143950939178, 0.6873754858970642, 0.23228511214256287, 0.010134601034224033, -0.5359913110733032, -0.05460263788700104, 0.5599900484085083, 0.2096939980983734, -0.01928182691...
something along the lines of - * Create an AppDomain in my TDD code using the AppDomain.CreateDomain() overload that allows you to pass in a PermissionSet. The PermissionSet would be constructed to match the different trust scenarios you'd want to test against. * Load the assembly containing logic under test into the app domain * Create instances of types/call methods etc in app domain, trap security exceptions Something kinda like that. I've not had time to knock up a proof of concept yet.
[ 0.4819452464580536, 0.1423235833644867, 0.12247506529092789, 0.2469186931848526, -0.0019814204424619675, -0.0004885449889115989, 0.5351348519325256, -0.22091564536094666, 0.0570695586502552, -0.6775176525115967, -0.01736525632441044, 0.2974843978881836, -0.3227185904979706, 0.1707352548837...
How can I efficiently and effectively detect the version and, for that matter, any available information about the instance of [Silverlight](http://silverlight.net/) currently running on the browser? The Silverlight control only has an [IsVersionSupported function](http://msdn.microsoft.com/en-us/library/system.windows.interop.silverlighthost.isversionsupported(VS.95).aspx), which returns true / false when you give it a version number, e.g.: ``` if(slPlugin.isVersionSupported("2.0")) { alert("I haz some flavour of Silverlight 2"); ``` You can be as specific as you want when checking the build, since the version string can include all of the following: * major - the major number * minor - the minor number * build - the build number * revision - the revision number So we can check for
[ 0.29236313700675964, 0.15690873563289642, 0.46535569429397583, -0.21009749174118042, -0.13869567215442657, -0.4461238384246826, 0.4081011712551117, -0.12889732420444489, -0.1119341030716896, -0.6112112402915955, -0.27445921301841736, 0.36871209740638733, -0.2673211395740509, 0.309135019779...
a specific build number as follows: ``` if(slPlugin.isVersionSupported("2.0.30523")) { alert("I haz Silverlight 2.0.30523, but could be any revision."); ``` [Silverlight 1.0 Beta included a control.settings.version property, which was replaced with the isVersionSupported() method](http://msdn.microsoft.com/en-us/library/bb693297.aspx#replace_version). The idea is that you shouldn't be programming against specific versions of Silverlight. Rather, you should be checking if the client has *at least* verion 1.0, or 2.0, etc. That being said, you can get the Silverlight version number in Firefox by checking the Silverlight plugin description: ``` alert(navigator.plugins["Silverlight Plug-In"].description); ``` Shows '2.0.30523.8' on my computer. Note that it is possible to brute force it by iterating through all released version numbers. [Presumably that's what BrowserHawk
[ 0.3372246325016022, 0.006408199202269316, 0.5437097549438477, -0.35756716132164, -0.10119441896677017, -0.38765817880630493, 0.4661373794078827, -0.3077576160430908, -0.05961368605494499, -0.5654636025428772, -0.29227158427238464, 0.579824686050415, -0.4953725039958954, 0.01091300789266824...
does](http://pages.citebite.com/w3o7qsydtr) - they'll report which version of Silverlight the client has installed.
[ 0.6817688941955566, 0.2943236827850342, 0.8454534411430359, 0.008764978498220444, 0.19742420315742493, -0.45540979504585266, -0.015002183616161346, -0.14012259244918823, -0.2386578768491745, -0.4468778371810913, 0.09000083059072495, 0.37216243147850037, -0.09346052259206772, -0.09039742499...
I'm using a Visual Studio web setup project to install an application that extends the functionality of Project Server. I want to call a method from the PSI ( Project Server Interface ) from one of the custom actions of my setup project, but every time a get a "401 Unauthorized access" error. What should I do to be able to access the PSI? The same code, when used from a Console Application, works without any issues. It sounds like in the console situation you are running with your current user credentials, which have access to the PSI. When running from
[ 0.7813712954521179, 0.0665481686592102, 0.12925168871879578, 0.1230822503566742, 0.43815451860427856, -0.011780695989727974, 0.014087457209825516, -0.008763045072555542, -0.1485333889722824, -0.5327165722846985, 0.17320172488689423, 0.7904140949249268, -0.07996620982885361, -0.066172443330...
the web, it's running with the creds of the IIS application instance. I think you'd either need to set up delegation to pass the session creds to the IIS application, or use some static creds for your IIS app that have access to the PSI.
[ 0.46952202916145325, -0.010372864082455635, 0.20655333995819092, 0.32467880845069885, -0.05573926493525505, -0.1752605140209198, -0.13008449971675873, 0.12714305520057678, -0.3837999999523163, -0.7747456431388855, 0.23751948773860931, 0.7483653426170349, -0.2369535118341446, 0.063909493386...
In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables? Will I get a significant performance gain if I used a bitset for 50 flags rather than using 50 separate bool variables? Well, 50 bools as a bitset will take 7 bytes, while 50 bools as bools will take 50 bytes. These days that's not really a big deal, so using bools is probably fine. However, one place a bitset might be useful is if you need to pass
[ 0.4442835748195648, -0.09578018635511398, -0.03149386867880821, 0.23694351315498352, -0.19710758328437805, -0.010951104573905468, 0.512482762336731, -0.32343384623527527, -0.3041702210903168, -0.366108238697052, 0.1312161237001419, 0.296832412481308, 0.013453958556056023, -0.05112399905920...
those bools around a lot, especially if you need to return the set from a function. Using a bitset you have less data that has to be moved around on the stack for returns. Then again, you could just use refs instead and have even less data to pass around. :)
[ 0.2938492000102997, -0.047527384012937546, 0.07052800059318542, 0.21819151937961578, -0.5563749074935913, -0.1290663629770279, 0.4908304214477539, -0.061151325702667236, -0.2104155272245407, -0.3540037274360657, -0.08615860342979431, 0.28050681948661804, -0.32979118824005127, 0.31910216808...
I would like to create an SSL connection for generic TCP communication. I think I figured out how to do it in the code, using the info here: <http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx> What I'm having trouble with is creating a cert so I can test this out. I tried makecert.exe testCert, and that created a cert, but apparently it doesn't have a private key associated with it. So what I'm looking for is the simplest procedure to create a cert and get the connection to work. I haven't found a *simple* way to do this yet, but I found [this site](http://www.herongyang.com/crypto/openssl_crt.html) helpful a few months
[ 0.3928775489330292, 0.09087616205215454, 0.19271554052829742, 0.26806536316871643, -0.05933286249637604, -0.36687231063842773, 0.25558802485466003, 0.18308843672275543, -0.09251882880926132, -0.7055627107620239, 0.07959360629320145, 0.07452530413866043, -0.23084819316864014, 0.135550528764...
back. O'Reilly also published a book called Network Security Hacks (available on Safari) that has a section starting at Hack #45 on creating your own certificate authority.
[ 0.5792968273162842, -0.08504343032836914, 0.09832844138145447, 0.1831369698047638, -0.05689655616879463, -0.4964131712913513, 0.11852551996707916, -0.006873252335935831, -0.3427256643772125, -0.22144047915935516, -0.2013857215642929, -0.010119304060935974, -0.08550147712230682, 0.019002500...
If I call `os.stat()` on a broken `symlink`, python throws an `OSError` exception. This makes it useful for finding them. However, there are a few other reasons that `os.stat()` might throw a similar exception. Is there a more precise way of detecting broken `symlinks` with Python under Linux? A common Python saying is that it's easier to ask forgiveness than permission. While I'm not a fan of this statement in real life, it does apply in a lot of cases. Usually you want to avoid code that chains two system calls on the same file, because you never know what will
[ 0.11558719724416733, 0.1325707733631134, -0.17049503326416016, -0.01053877267986536, -0.1349007487297058, -0.4411802589893341, 0.7417071461677551, 0.15093694627285004, -0.47811034321784973, -0.533800482749939, -0.2893774211406708, 0.6114436388015747, -0.3558814227581024, 0.1993619352579116...
happen to the file in between your two calls in your code. **A typical mistake is to write something like**: ``` if os.path.exists(path): os.unlink(path) ``` The second call (os.unlink) may fail if something else deleted it after your if test, raise an Exception, and stop the rest of your function from executing. (You might think this doesn't happen in real life, but we just fished another bug like that out of our codebase last week - and it was the kind of bug that left a few programmers scratching their head and claiming 'Heisenbug' for the last few months) So, in your particular
[ 0.1642616093158722, 0.2214793562889099, 0.263680100440979, -0.03478396311402321, 0.3291010856628418, -0.2716163098812103, 0.6346940398216248, 0.3189210295677185, -0.30946657061576843, -0.746366560459137, -0.32163840532302856, 0.4272640645503998, -0.4656812846660614, 0.27594053745269775, ...
case, I would probably do: ``` try: os.stat(path) except OSError, e: if e.errno == errno.ENOENT: print 'path %s does not exist or is a broken symlink' % path else: raise e ``` The annoyance here is that stat returns the same error code for a symlink that just isn't there and a broken symlink. So, I guess you have no choice than to break the atomicity, and do something like ``` if not os.path.exists(os.readlink(path)): print 'path %s is a broken symlink' %
[ -0.22925491631031036, 0.12538322806358337, 0.3085578680038452, 0.021099189296364784, -0.059394050389528275, -0.16651329398155212, 0.4586522579193115, -0.18972820043563843, -0.22128930687904358, -0.8406088352203369, -0.12185966223478317, 0.7376224994659424, -0.19639907777309418, -0.10775686...
path ```
[ 0.3111259937286377, 0.3124736547470093, 0.2359255701303482, 0.23360596597194672, 0.3004467487335205, 0.0527818389236927, 0.49860018491744995, 0.14723214507102966, -0.17889417707920074, -0.7515883445739746, -0.19356472790241241, 0.2491699606180191, -0.041658587753772736, 0.13455148041248322...
I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes. Basically, I have an external disk with two volumes: One is an HFS+ volume which I use for TimeMachine backups. The other, an NTFS volume that I use for general file copying etc on Mac and Windows boxes. So what happens is that whenever I plug in the disk into my Mac USB, OSX goes off and mounts both volumes
[ 0.2592426836490631, 0.19054998457431793, 0.33040961623191833, 0.09572301059961319, 0.13255679607391357, -0.2077631801366806, 0.0070695215836167336, 0.1528223752975464, -0.3007333278656006, -0.5041415095329285, -0.14963726699352264, 0.6694105863571167, -0.143141508102417, 0.3681166470050812...
and shows an icon on the desktop for each. The thing is that to remove the disk you have to eject the volume and in this case do it for both volumes, which causes an annoying warning dialog to be shown every time. What I'd prefer is some way to prevent the NTFS volume from auto-mounting altogether. I've done some hefty googling and here's a list of things I've tried so far: * I've tried going through options in Disk Utility * I've tried setting AutoMount to No in /etc/hostconfig but that is a bit too global for my liking. * I've also
[ 0.27825120091438293, 0.25575143098831177, 0.46719297766685486, -0.1182141974568367, -0.11509070545434952, -0.295179545879364, 0.3791954517364502, 0.17113643884658813, -0.47176069021224976, -0.7410826086997986, -0.20108042657375336, 1.1264797449111938, -0.10893946141004562, 0.35488912463188...
tried the suggested approach to putting settings in fstab but it appears the OSX (10.5) is ignoring these settings. Any other suggestions would be welcomed. Just a little dissapointed that I can't just tick a box somewhere (or untick). EDIT: Thanks heaps to hop for the answer it worked a treat. For the record it turns out that it wasn't OSX not picking up the settings I actually had "msdos" instead of "ntfs" in the fs type column. The following entry in `/etc/fstab` will do what you want, even on 10.5 (Leopard): ``` LABEL=VolumeName none ntfs noauto ``` If the
[ 0.10787645727396011, 0.0343656986951828, 0.47282353043556213, -0.1946941465139389, -0.04796895757317543, 0.03647657111287117, 0.6416932344436646, -0.0141709353774786, -0.33388611674308777, -0.5878920555114746, -0.22001536190509796, 0.7119007706642151, -0.47106075286865234, -0.2110429108142...
file is not already there, just create it. Do not use `/etc/fstab.hd`! No reloading of `diskarbitrationd` needed. If this still doesn't work for you, maybe you can find a hint in the syslog.
[ 0.4208791255950928, -0.07893326133489609, 0.13522173464298248, 0.39687201380729675, 0.14272940158843994, -0.5674821138381958, 0.3234308063983917, 0.48223528265953064, -0.028143439441919327, -0.7713959813117981, -0.11511020362377167, 0.772674560546875, -0.08929494768381119, 0.02738540992140...
I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column that's comma separated (sounds crazy but could work). I've even heard someone recommend a sparse matrix, but then how do the tag names grow gracefully? Am I missing a best practice for tags? Three tables (one for storing all items, one for all tags, and one for the relation between the two), properly indexed, with foreign
[ 0.16413110494613647, -0.09283590316772461, 0.26823610067367554, 0.2808239161968231, -0.0763462483882904, 0.034519046545028687, -0.03240837901830673, -0.27529674768447876, -0.2405535727739334, -0.8938627243041992, 0.06163724511861801, 0.20572203397750854, -0.29004091024398804, 0.05135320872...
keys set running on a proper database, should work well and scale properly. ``` Table: Item Columns: ItemID, Title, Content Table: Tag Columns: TagID, Title Table: ItemTag Columns: ItemID, TagID ```
[ -0.5289692282676697, 0.22813497483730316, 0.652934193611145, 0.4524412453174591, 0.1718239039182663, 0.05948275700211525, -0.05731487274169922, -0.21684405207633972, -0.3350012004375458, -0.5447803139686584, -0.4043601155281067, 0.3678663372993469, -0.29441753029823303, 0.31796160340309143...
I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test). Yes, I can test the underlying objects the web service uses on their own (which I am), but what I am interested in testing in this cases is that the proxies are all working and handled as expected, etc. Any advice? I found [this post](http://haacked.com/archive/2006/12/12/using_webserver.webdev_for_unit_tests.aspx) and [this one](http://www.hanselman.com/blog/NUnitUnitTestingOfASPNETPagesBaseClassesControlsAndOtherWidgetryUsingCassiniASPNETWebMatrixVisualStudioWebDeveloper.aspx) which have
[ 0.45383164286613464, 0.023468298837542534, -0.02829211950302124, 0.10075558722019196, -0.2528350055217743, -0.19603604078292847, 0.40910038352012634, -0.14153242111206055, -0.15944789350032806, -0.6264917850494385, 0.11105094850063324, 0.46026742458343506, 0.019810987636446953, -0.04543899...
some solutions on how to start up WebDev.WebServer.exe from within a unit test. Looks like I'll need to do something along these lines. Until I get that going, I found that what works is to simply run the web service project within VS, let the WebDev server start up that way, and then run the unit tests. Not ideal, but it's OK for now.
[ 0.5697428584098816, -0.23980072140693665, 0.31997373700141907, 0.3216632604598999, -0.23239153623580933, -0.22067877650260925, 0.2409459352493286, 0.03624315187335014, 0.08196143060922623, -0.6848867535591125, 0.39651936292648315, 0.5583212375640869, 0.14987719058990479, 0.0015549698146060...
I'm new to SQL Server Reporting Services, and was wondering the best way to do the following: > * Query to get a list of popular IDs > * Subquery on each item to get properties from another table Ideally, the final report columns would look like this: ``` [ID] [property1] [property2] [SELECT COUNT(*) FROM AnotherTable
[ 0.41218599677085876, 0.2048833966255188, 0.3072895407676697, 0.08533993363380432, -0.24811403453350067, -0.3956283628940582, -0.13005171716213226, -0.25884953141212463, -0.17051076889038086, -0.4525650143623352, 0.20077264308929443, 0.33912408351898193, 0.08509490638971329, 0.1512277126312...
WHERE ForeignID=ID] ``` There may be ways to construct a giant SQL query to do this all in one go, but I'd prefer to compartmentalize it. Is the recommended approach to write a VB function to perform the subquery for each row? Thanks for any help. I would recommend using a [SubReport](http://msdn.microsoft.com/en-us/library/ms160348.aspx). You would place the SubReport in a table cell.
[ 0.00725099490955472, 0.3084849715232849, 0.23250551521778107, -0.22475555539131165, 0.1437152624130249, -0.03548246994614601, -0.07757563143968582, 0.12612901628017426, -0.28465890884399414, -0.5998292565345764, -0.12148343026638031, 0.26063477993011475, -0.37709447741508484, 0.31639474630...
My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development. Most of our other development is done using .NET. I'm trying to make a push towards doing Silverlight development instead, since it would take better advantage of the .NET developers on staff. I prefer the Silverlight platform over the Flex platform for the simple fact that Silverlight is all .NET code. We have more .NET developers on staff than Flash/Flex developers, and most of our
[ 0.8039349913597107, 0.612402617931366, 0.03560447320342064, -0.2161482274532318, 0.21371446549892426, -0.05826941132545471, -0.1581360548734665, 0.21026936173439026, -0.16299863159656525, -0.5708125233650208, -0.047122854739427567, 0.6738908290863037, 0.07847117632627487, 0.140040561556816...
Flash/Flex developers are graphic artists (not real programmers). Only reason they push towards Flex right now is because it seems like the logical step from Flash. I've done development using both, and I honestly believe Silverlight is easier to work with. But I'm trying to convince people who are only Flash developers. So here's my question: If I'm going to go into a meeting to praise Silverlight, why would a company want to go with Silverlight instead of Flex? Other than the obvious "not everyone has Silverlight", what are the pros and cons for each? I think you should look at Silverlight
[ 0.779369056224823, 0.02418871410191059, -0.10707803070545197, 0.167519211769104, -0.3619171679019928, -0.1844286173582077, -0.26927220821380615, 0.06839239597320557, -0.1088646724820137, -0.5959432721138, 0.27975326776504517, 0.785645067691803, -0.10315095633268356, -0.14215651154518127, ...
as a long-term play, just as Microsoft seems to be doing. There's an obvious balance on when to use Silverlight vs. Flash when you're concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in: 1. Second mover advantage - Just as Microsoft built a "better Java" with .NET, they're able to look at how you'd design a RIA plugin from scratch, today. They have the advantage of knowing how people use the web today, something the inventors of Flash could never have accurately guessed. Flash can add features, but they can't realistically
[ 0.08434808999300003, -0.354250967502594, 0.10545971244573593, 0.23850496113300323, -0.19181491434574127, -0.38664814829826355, -0.18871453404426575, -0.04258834943175316, -0.2779262959957123, -0.738696277141571, 0.21563774347305298, 0.5145395398139954, 0.09141819924116135, -0.2170859575271...
chuck the platform and start over. 2. Developer familiarity - While Silverlight is a new model, it's not entirely unfamiliar to developers. They'll "get" the way Silverlight works a lot more quickly than they'll understand firing up a new development environment with a new scripting language and new event paradigms. 3. Being rid of the timeline model in Flash - Flash was originally built for keyframe based animations, and while there are ways to abstract this away, it's at the core of how Flash works. Silverlight ditches that for an application-centric model. 4. ScottGu - ScottGu is fired up about Silverlight. Nuff said. 5.
[ 0.5040898323059082, 0.28072023391723633, 0.0968770682811737, 0.3322596251964569, -0.3300321102142334, -0.6085749268531799, 0.15231499075889587, 0.03305463865399361, -0.053423963487148285, -0.3577573299407959, -0.028611401095986366, 0.5158862471580505, 0.052464988082647324, 0.21740877628326...
Cool new features - While Silverlight still has some catching up to do with Flash on some obvious features (like webcam / mic integration, or 3d / graphics acceleration), there are some slick new technologies built in to Silverlight - Deep Zoom is one example. I'm seeing more "revolutionary" technologies on the Silverlight side, while Flash seems to be in maintenance mode at this point.
[ 0.4160430133342743, -0.03379639610648155, 0.24905040860176086, 0.5314568877220154, 0.21380241215229034, -0.734562337398529, -0.05912482365965843, 0.053761135786771774, -0.3583995997905731, -0.39322954416275024, 0.34220853447914124, 0.42928656935691833, 0.2963264286518097, 0.075974494218826...
I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created to 2.0.50727.0. Ideally I would like to adsutil.vbs to update the metabase. How do I do this? @[Chris](https://stackoverflow.com/questions/20923/vbscriptiis-how-do-i-automatically-set-aspnet-version-for-a-particular-website#20953) beat me to the punch on the ADSI way You can do this using the aspnet\_regiis.exe tool. There is one of these tools per version of ASP.NET installed on the machine. You could shell out to - This configures ASP.NET 1.1 ``` %windir%\microsoft.net\framework\v1.1.4322\aspnet_regiis -s W3SVC/[iisnumber]/ROOT ``` This configures
[ 0.20385058224201202, 0.043569114059209824, 0.4854886829853058, -0.03120877966284752, -0.17728129029273987, -0.03433288633823395, 0.29766079783439636, -0.23351359367370605, -0.30435946583747864, -0.7909758687019348, 0.2540091276168823, 0.5988791584968567, -0.473577082157135, -0.175016850233...
ASP.NET 2.0 ``` %windir%\microsoft.net\framework\v2.0.50727\aspnet_regiis -s W3SVC/[iisnumber]/ROOT ``` You probably already know this, but if you have multiple 1.1 and 2.0 sites on your machine, just remember to switch the website you're changing ASP.NET versions on to compatible app pool. ASP.NET 1.1 and 2.0 sites don't mix in the same app pool.
[ 0.10600067675113678, -0.1250453144311905, 0.5572831034660339, -0.00044622886343859136, -0.17212791740894318, 0.005238975398242474, 0.3527776896953583, -0.0912085473537445, -0.41836240887641907, -0.7910103797912598, -0.2738328278064728, 0.3831881284713745, -0.3344118893146515, -0.0411620922...
I'm trying to unit test a custom ConfigurationSection I've written, and I'd like to load some arbitrary configuration XML into a [System.Configuration.Configuration](http://msdn.microsoft.com/en-us/library/system.configuration.configuration.aspx) for each test (rather than put the test configuration xml in the Tests.dll.config file. That is, I'd like to do something like this: ``` Configuration testConfig = new Configuration("<?xml version=\"1.0\"?><configuration>...</configuration>"); MyCustomConfigSection section = testConfig.GetSection("mycustomconfigsection"); Assert.That(section != null); ``` However, it looks like [ConfigurationManager](http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx) will only give you Configuration instances that are associated with an EXE file or a machine config. Is there a way to load arbitrary XML into a Configuration instance? There is actually a way I've discovered.... You need to define a new class
[ 0.383023738861084, -0.03586099296808243, 0.16563820838928223, 0.2633512616157532, 0.17203925549983978, -0.11807768791913986, 0.1528807282447815, -0.2639504075050354, -0.179843470454216, -0.8422239422798157, -0.03464117646217346, 0.41951850056648254, -0.2543172836303711, 0.3361431658267975,...
inheriting from your original configuration section as follows: ``` public class MyXmlCustomConfigSection : MyCustomConfigSection { public MyXmlCustomConfigSection (string configXml) { XmlTextReader reader = new XmlTextReader(new StringReader(configXml)); DeserializeSection(reader); } } ``` You can then instantiate your ConfigurationSection object as follows: ``` string configXml = "<?xml version=\"1.0\"?><configuration>...</configuration>"; MyCustomConfigSection config = new MyXmlCustomConfigSection(configXml); ``` Hope it helps someone :-)
[ 0.08865227550268173, -0.24326924979686737, 0.5121148228645325, 0.1491989940404892, 0.23379912972450256, -0.032374437898397446, 0.062123093754053116, -0.48090097308158875, -0.3338102102279663, -0.6033416986465454, -0.15823736786842346, 0.6391195058822632, -0.27103182673454285, 0.31109225749...
When creating a web application, and lets say you have a User object denoting a single user, what do you think is the best way to store that the user has logged in? Two ways I've thought about have been: * Stored the user database id in a session variable * Stored the entire user object in a session variable Any better suggestions, any issues with using the above ways? Perhaps security issues or memory issues, etc, etc. I recommend storing the id rather than the object. The downside is that you have to hit the database every time you want to get that user's
[ 0.4791097044944763, 0.24992850422859192, 0.16352888941764832, 0.12187805026769638, 0.09828811883926392, -0.23453105986118317, 0.24583612382411957, 0.0030715481843799353, -0.31184864044189453, -0.701296329498291, 0.17833039164543152, 0.5301681756973267, -0.23782868683338165, 0.0165768191218...
information. However, unless every millisecond counts in your page, the performance shouldn't be an issue. Here are two advantages: 1. If the user's information changes somehow, then you won't be storing out-of-date information in your session. For example, if a user is granted extra privileges by an admin, then those will be immediately available without the user needing to log out and then log back in. 2. If your session information is stored on the hard drive, then you can only store serializable data. So if your User object ever contains anything like a database connection, open socket, file descriptor, etc then
[ 0.17674744129180908, -0.02397385612130165, 0.5563967823982239, 0.59320068359375, 0.1988854706287384, -0.3293689489364624, 0.14576829969882965, -0.006403508596122265, -0.5370507836341858, -0.8211266994476318, -0.1833009272813797, 0.5047565698623657, 0.0426892414689064, 0.18955056369304657, ...
this will not be stored properly and may not be cleaned up properly either. In most cases these concerns won't be an issue and either approach would be fine.
[ 0.3785495460033417, 0.21598733961582184, 0.12757720053195953, 0.30102357268333435, 0.6094925403594971, -0.14237244427204132, 0.07458345592021942, -0.09960343688726425, -0.33754125237464905, -0.4638224244117737, -0.11118113994598389, 0.22711355984210968, -0.09083083271980286, 0.148706868290...
When I try to create a SQL Server Login by saying ``` CREATE LOGIN [ourdomain\SQLAccessGroup] FROM WINDOWS; ``` I get this error > The server principal 'ourdomain\SQLAccessGroup' already exists. However, when I try this code ``` DROP LOGIN [ourdomain\SQLAccessGroup] ``` I get this error > Cannot drop the login 'ourdomain\SQLAccessGroup', because it does not exist or you do not have permission. The user that I am executing this code as is a sysadmin. Additionally, the user `ourdomain\SQLAccessGroup` does not show up in this query ``` select * from sys.server_principals ``` Does anyone have any ideas? We are still struggling to understand the *HOW* of this issue, but it seems that [ourdomain\SQLAccessGroup] was aliased by a consultant to
[ 0.40165451169013977, 0.2596670985221863, 0.10823572427034378, 0.07765588909387589, 0.13971582055091858, -0.4539099931716919, 0.44950419664382935, 0.1809099316596985, -0.21210770308971405, -0.4764658808708191, -0.20143097639083862, 0.22921974956989288, -0.34467393159866333, 0.52061688899993...
a different user name (this is part of an MS CRM installation). We finally were able to use some logic and some good old SID comparisons to determine who was playing the imposter game. Our hint came when I tried to add the login as a user to the database (since it supposedly already existed) and got this error: ``` The login already has an account under a different user name. ``` So, I started to examine each DB user and was able to figure out the culprit. I eventually tracked it down and was able to rename the user and login so that the
[ 0.5153388381004333, 0.2174939513206482, -0.028871525079011917, 0.10047336667776108, -0.07378575205802917, -0.015343370847404003, 0.4921824336051941, 0.11719903349876404, -0.13979652523994446, -0.26528316736221313, 0.20506565272808075, 0.3291890621185303, -0.5004516839981079, 0.541854262351...
CRM install would work. I wonder if I can bill them $165.00 an hour for my time... :-)
[ 0.7308787703514099, 0.324309378862381, 0.9107974171638489, 0.16539236903190613, 0.6034497022628784, -0.10522951930761337, 0.13393662869930267, 0.06358512490987778, -0.15826022624969482, -0.6209337115287781, 0.23764023184776306, 1.0275392532348633, 0.07003602385520935, -0.11929062753915787,...
When I'm working with DataBound controls in ASP.NET 2.0 such as a Repeater, I know the fastest way to retrieve a property of a bound object (instead of using Reflection with the Eval() function) is to cast the DataItem object to the type it is and then use that object natively, like the following: ``` <%#((MyType)Container.DataItem).PropertyOfMyType%> ``` The problem is, if this type is in a namespace (which is the case 99.99% of the time) then this single statement because a lot longer due to the fact that the ASP page has no concept of class scope so all of my types need to
[ 0.2557494640350342, 0.027010183781385422, 0.07966429740190506, -0.09532646089792252, -0.21234948933124542, -0.14180822670459747, 0.2766449451446533, -0.27768567204475403, 0.009755164384841919, -0.6351975798606873, -0.004789566621184349, 0.47268807888031006, -0.10157448053359985, 0.18876011...
be fully qualified. ``` <%#((RootNamespace.SubNamespace1.SubNamspace2.SubNamespace3.MyType)Container.DataItem).PropertyOfMyType%> ``` Is there any kind of `using` directive or some equivalent I could place somewhere in an ASP.NET page so I don't need to use the full namespace every time? I believe you can add something like: ``` <%@ Import Namespace="RootNamespace.SubNamespace1" %> ``` At the top of the page.
[ 0.6832873821258545, 0.10221096873283386, 0.5021144151687622, 0.19773827493190765, 0.3121583163738251, -0.542490541934967, 0.319661021232605, -0.5083200931549072, 0.1981692761182785, -0.8212355375289917, -0.24448393285274506, 0.6475943326950073, 0.2900971472263336, -0.37281766533851624, 0...
What's the easiest way to profile a PHP script? I'd love tacking something on that shows me a dump of all function calls and how long they took but I'm also OK with putting something around specific functions. I tried experimenting with the [microtime](http://php.net/microtime) function: ``` $then = microtime(); myFunc(); $now = microtime(); echo sprintf("Elapsed: %f", $now-$then); ``` but that sometimes gives me negative results. Plus it's a lot of trouble to sprinkle that all over my code. The [PECL APD](http://www.php.net/apd) extension is used as follows: ``` <?php apd_set_pprof_trace(); //rest of the script ?> ``` After, parse the generated file using `pprofp`. Example output: ``` Trace for /home/dan/testapd.php Total Elapsed Time = 0.00 Total System Time = 0.00 Total User Time
[ 0.05533808469772339, -0.13365167379379272, 0.3986663520336151, -0.08204063028097153, 0.03623373433947563, 0.0918787345290184, 0.39056164026260376, -0.152242049574852, -0.07333123683929443, -0.6649124026298523, 0.14597921073436737, 0.34557613730430603, -0.05202620103955269, -0.2447961270809...
= 0.00 Real User System secs/ cumm %Time (excl/cumm) (excl/cumm) (excl/cumm) Calls call s/call Memory Usage Name -------------------------------------------------------------------------------------- 100.0 0.00 0.00 0.00 0.00 0.00 0.00 1 0.0000 0.0009 0 main 56.9 0.00 0.00 0.00 0.00 0.00 0.00
[ -0.4253323972225189, -0.07195486128330231, 0.8432523608207703, -0.08145731687545776, 0.2887077331542969, 0.19897031784057617, 0.3622457683086395, 0.025251269340515137, -0.025086170062422752, -0.4432324171066284, -0.4271122217178345, 0.5842253565788269, -0.02283553220331669, 0.3133665323257...
1 0.0005 0.0005 0 apd_set_pprof_trace 28.0 0.00 0.00 0.00 0.00 0.00 0.00 10 0.0000 0.0000 0 preg_replace 14.3 0.00 0.00 0.00 0.00 0.00 0.00 10 0.0000 0.0000 0 str_replace ``` **Warning: the latest release of APD is dated 2004, the extension [is no longer maintained](https://pecl.php.net/package/apd) and has various compability issues (see comments).**
[ 0.15287134051322937, 0.05892486125230789, 0.829227864742279, -0.2350383698940277, -0.175034299492836, 0.058779746294021606, 0.29589855670928955, -0.37602031230926514, -0.2125212848186493, -0.5162667632102966, -0.19613885879516602, 0.36560726165771484, -0.4365047514438629, 0.117233745753765...
I am looking for a text editor to be used in a web page. Where users can format the text and get a WYSIWYG experience. Doesn't need to be too fancy. But has to be easy to use and integrate into the page. Has to generate HTML as output. Support AJAX (one I checked works only with standard form submit) and has to be small in terms of download to the user's browser. Well it depends what platform you are on if you are looking for server-side functionality as well, but the defacto badass WYSIWYg in my opinion is [FCKeditor](http://www.fckeditor.net/). I
[ 0.27602532505989075, 0.051946863532066345, 0.28037744760513306, 0.06207531690597534, -0.3735352158546448, -0.5047509074211121, 0.24472194910049438, 0.03810188174247742, -0.05424853414297104, -0.6361488699913025, 0.020284736528992653, 0.37977397441864014, -0.42715781927108765, -0.1033252105...
have worked with this personally in numerous environments (both professional and hobby level) and have always been impressed. It's certainly worth a look. I believe it is employed by open source projects such as SubText as well. Perhaps, [Jon Galloway](http://weblogs.asp.net/jgalloway/) can add to this if he reads this question. Or [Phil](http://haacked.com/Default.aspx) if he is currently a user.
[ 0.5825355052947998, 0.08515489101409912, 0.17373564839363098, -0.11460726708173752, 0.23066315054893494, -0.6410650014877319, 0.044083964079618454, 0.4527128040790558, -0.23353001475334167, -0.4485982656478882, -0.16086770594120026, 0.3322719633579254, 0.24324987828731537, -0.1171252727508...
VC++ makes functions which are implemented within the class declaration inline functions. If I declare a class `Foo` as follows, then are the CONSTRUCTOR and DESTRUCTOR inline functions? ``` class Foo { int* p; public: Foo() { p = new char[0x00100000]; } ~Foo() { delete [] p; } }; { Foo f; (f); } ``` Defining the body of the constructor INSIDE the class has the same effect as placing the function OUTSIDE the class with the "inline" keyword. In both cases it's a hint to the compiler. An "inline" function doesn't necessarily mean the
[ 0.22616927325725555, -0.07036815583705902, 0.9654028415679932, -0.3102358281612396, -0.01839279755949974, 0.17365415394306183, 0.26818132400512695, -0.4686068594455719, 0.21083402633666992, -0.38141822814941406, -0.12517066299915314, 0.8534403443336487, -0.49821045994758606, 0.118610702455...
function will be inlined. That depends on the complexity of the function and other rules.
[ -0.11955218762159348, -0.17665350437164307, 0.5122981667518616, 0.20377254486083984, -0.11043472588062286, 0.1406051367521286, 0.15823492407798767, -0.2303493767976761, 0.2628477215766907, -0.5696213245391846, 0.14280249178409576, 0.6506296992301941, -0.5448153018951416, 0.1135488972067833...
I did some tests a while ago and never figured out how to make this work. **The ingredients:** * COM+ transactional object (developed in VB6) * .Net web application (with transaction) in IIS that... makes a call to the COM+ component updates a row in a SQL database **Testing:** Run the .Net application and force an exception. **Result:** The update made from the .Net application rolls back. The update made by the COM+ object does not roll back. If I call the COM+ object from an old ASP page the rollback works. I know some people may be thinking "what?! COM+ and
[ 0.25372087955474854, -0.06968749314546585, 0.4592571556568146, -0.013586227782070637, -0.21069316565990448, 0.020451176911592484, 0.055008482187986374, -0.4315527677536011, -0.03184588998556137, -0.5041806697845459, -0.013081209734082222, 0.6983382701873779, -0.22308872640132904, 0.0473108...
.Net you must be out of your mind!", but there are some places in this world where there still are a lot of COM+ components. I was just curious if someone ever faced this and if you figured out how to make this work. Because VB and .NET will use different SQL connections (and there is no way to make ADO and ADO.NET share the same connection), your only possibility is to enlist the DTC (Distributed Transaction Coordinator). The DTC will coordinates the two independent transactions so they commit or are rolled-back together. **From .NET**, EnterpriseServices manages COM+ functionality, such as the
[ 0.42055726051330566, -0.16146743297576904, 0.24604791402816772, 0.33672183752059937, -0.08042839169502258, -0.5332338213920593, -0.0047737108543515205, 0.15237130224704742, -0.34500834345817566, -0.6611263155937195, -0.2897161841392517, 0.4606814980506897, -0.2559133768081665, 0.3312365412...
DTC. In .NET 2.0 and forward, you can use the System.Transactions namespace, which makes things a little nicer. I think something like this should work (untested code): ``` void SomeMethod() { EnterpriseServicesInteropOption e = EnterpriseServicesInteropOption.Full; using (TransactionScope s = new TransactionScope(e)) { MyComPlusClass o = new MyComPlusClass(); o.SomeTransactionalMethod(); } } ``` I am not familiar enough with this to give you more advice at this point. **On the COM+ side**, your object needs to be configured to use (most likely "require")
[ 0.0830298662185669, -0.27289140224456787, 0.3177332878112793, 0.014918139204382896, 0.3063989281654358, -0.24483175575733185, 0.08402431756258011, 0.28251564502716064, -0.34381404519081116, -0.8347541689872742, -0.21593402326107025, 0.5876158475875854, -0.2735580503940582, 0.08546032011508...
a distributed transaction. You can do that from COM+ Explorer, by going to your object's *Properties*, selecting the *Transaction* tab, and clicking on "*Required*". I don't remember if you can do this from code as well; VB6 was created before COM+ was released, so it doesn't fully support everything COM+ does (its transactional support was meant for COM+'s predecessor, called MS Transaction Server). If everything works correctly, your COM+ object should be enlisting in the existing Context created by your .NET code. You can use the "Distributed Transaction Coordinator\Transaction List" node in "Component Services" to check and see the distributed transaction being
[ 0.146320641040802, -0.3409407138824463, 0.29677483439445496, 0.1550009399652481, -0.18552473187446594, -0.4040047526359558, -0.03559163585305214, -0.02406068705022335, -0.5025668144226074, -0.658039391040802, 0.144488126039505, 0.44409653544425964, -0.5761669874191284, 0.3315085172653198, ...