Search Results

Search found 2716 results on 109 pages for 'michael tanner'.

Page 52/109 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • C# Active Directory - Check username / password

    - by Michael G
    I'm using the following code on Windows Vista Ultimate SP1 to query our active directory server to check the user name and password of a user on a domain. public Object IsAuthenticated() { String domainAndUsername = strDomain + @"\" + strUser; DirectoryEntry entry = new DirectoryEntry(_path, domainAndUsername, strPass); SearchResult result; try { //Bind to the native AdsObject to force authentication. DirectorySearcher search = new DirectorySearcher(entry) { Filter = ("(SAMAccountName=" + strUser + ")") }; search.PropertiesToLoad.Add("givenName"); // First Name search.PropertiesToLoad.Add("sn"); // Last Name search.PropertiesToLoad.Add("cn"); // Last Name result = search.FindOne(); if (null == result) { return null; } //Update the new path to the user in the directory. _path = result.Path; _filterAttribute = (String)result.Properties["cn"][0]; } catch (Exception ex) { return new Exception("Error authenticating user. " + ex.Message); } return user; } the target is using .NET 3.5, and compiled with VS 2008 standard I'm logged in under a domain account that is a domain admin where the application is running. The code works perfectly on windows XP; but i get the following exception when running it on Vista: System.DirectoryServices.DirectoryServicesCOMException (0x8007052E): Logon failure: unknown user name or bad password. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at System.DirectoryServices.DirectorySearcher.FindOne() at Chain_Of_Custody.Classes.Authentication.LdapAuthentication.IsAuthenticated() at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at System.DirectoryServices.DirectorySearcher.FindOne() at Chain_Of_Custody.Classes.Authentication.LdapAuthentication.IsAuthenticated() I've tried changing the authentication types, I'm not sure what's going on. See also: http://stackoverflow.com/questions/290548/c-validate-a-username-and-password-against-active-directory

    Read the article

  • How can I inject an object into an WCF IErrorHandler implementation with Castle Windsor?

    - by Michael Johnson
    I'm developing a set of services using WCF. The application is doing dependency injection with Castle Windsor. I've added an IErrorHandler implementation that is added to services via an attribute. Everything is working thus far. The IErrorHandler object (of a class called FaultHandler is being applied properly and invoked. Now I'm adding logging. Castle Windsor is set up to inject the logger object (an instance of IOurLogger). This is working. But when I try to add it to FaultHandler my logger is null. The code for FaultHandler looks something like this: class FaultHandler : IErrorHandler { public IOurLogger logger { get; set; } public bool HandleError(Exception error) { logger.Write("Exception type {0}. Message: {1}", error.GetType(), error.Message); // Let WCF handle things its way. We only want to log. return false; } public void ProvideFault(Exception error, MessageVersion version, Message fault) { } } This throws it's own exception, since logger is null when HandleError() is called. The logger is being successfully injected into the service itself and is usable there, but for some reason I can't use it in FaultHandler. Update: Here is the relevant part of the Windsor configuration file (edited to protect the innocent): <configuration> <components> <component id="Logger" service="Our.Namespace.IOurLogger, Our.Namespace" type="Our.Namespace.OurLogger, Our.Namespace" /> </components> </configuration>

    Read the article

  • FreeRTOS Sleep Mode hazards while using MSP430f5438

    - by michael
    Hi, I wrote an an idle hook shown here void vApplicationIdleHook( void ) { asm("nop"); P1OUT &= ~0x01;//go to sleep lights off! LPM3;// LPM Mode - remove to make debug a little easier... asm("nop"); } That should cause the LED to turn off, and MSP430 to go to sleep when there is nothing to do. I turn the LED on during some tasks. I also made sure to modify the sleep mode bit in the SR upon exit of any interrupt that could possibly wake the MCU (with the exception of the scheduler tick isr in portext.s43. The macro in iar is __bic_SR_register_on_exit(LPM3_bits); // Exit Interrupt as active CPU However, it seems as though putting the MCU to sleep causes some irregular behavior. The led stays on always, although when i scope it, it will turn off for a couple instructions cycles when ever i wake the mcu via one of the interrupts (UART), and then turn back on. If I comment out the LPM3 instruction, things go as planned. The led stays off for most of the time and only comes on when a task is running. I am using a MSP4f305438 Any ideas?

    Read the article

  • Proper Case Title Case Question

    - by Michael Quiles
    What am i doing wrong here? I want the users name to be shown in the output as propercase but I cant figure it out. string proper = this.xTripNameTextBox.Text; CultureInfo properCase = System.Threading.Thread.CurrentThread.CurrentCulture; TextInfo currentInfo = properCase.TextInfo; proper = currentInfo.ToTitleCase(proper); this.xTripOutputLabel.Text = proper + Environment.NewLine + "The total gallons you would use: " + Output.ToString("0") + Environment.NewLine + "Total amount it will cost you: " + Coutput.ToString("C") + Environment.NewLine +" Your customer number is " + rnd1.Next(1, 1000).ToString();

    Read the article

  • Python urllib.urlopen IOError

    - by Michael
    So I have the following lines of code in a function sock = urllib.urlopen(url) html = sock.read() sock.close() and they work fine when I call the function by hand. However, when I call the function in a loop (using the same urls as earlier) I get the following error: > Traceback (most recent call last): File "./headlines.py", line 256, in <module> main(argv[1:]) File "./headlines.py", line 37, in main write_articles(headline, output_folder + "articles_" + term +"/") File "./headlines.py", line 232, in write_articles print get_blogs(headline, 5) File "/Users/michaelnussbaum08/Documents/College/Sophmore_Year/Quarter_2/Innovation/Headlines/_code/get_content.py", line 41, in get_blogs sock = urllib.urlopen(url) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 87, in urlopen return opener.open(url) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 203, in open return getattr(self, name)(url) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 314, in open_http if not host: raise IOError, ('http error', 'no host given') IOError: [Errno http error] no host given Any ideas?

    Read the article

  • Binding an ASP.NET GridView Control to a string array

    - by Michael Kniskern
    I am trying to bind an ASP.NET GridView control to an string array and I get the following item: A field or property with the name 'Item' was not found on the selected data source. What is correct value I should use for DataField property of the asp:BoundField column in my GridView control. Here is my source code: ASPX page <asp:GridView ID="MyGridView" runat="server" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="Item" /> <asp:CommandField ButtonType="Link" ShowSelectButton="true" SelectText="Click Me!" /> </Columns> </asp:GridView> Code Behind: string[] MyArray = new string[1]; MyArray[0] = "My Value"; MyGridView.DataSource = MyArray; MyGridView.DataBind(); UPDATE I need to have the AutoGenerateColumns attribute set to false because I need to generate additional asp:CommandField columns. I have updated my code sample to reflect this scenarion

    Read the article

  • SLES 9 vs. SLES 10

    - by Michael Covelli
    Are there any important change in how SLES 10 implements Tcp sockets vs. SLES 9? I have several apps written in C# (.NET 3.5) that run on Windows XP and Windows Server 2003. They've been running fine for over a year, getting market data from a SLES 9 machine using a socket connection. The machine was upgraded today to SLES 10 and its causing some strange behavior. The socket normally returns a few hundred or thousand bytes every second. But occasionally, I stop receiving data. Ten or more seconds will go by with no data and then Receive returns with a 10k+ bytes. And some buffer is causing data loss because the bytes I receive on the socket no longer make a correct packet. The only thing changed was the SLES 9 to 10 upgrade. And rolling back fixes this immediately. Any ideas?

    Read the article

  • GNU Makefile book

    - by Michael
    Any books you would recommend to learn scripting makefiles? I know gnu.org has manual, but hope there is a book with better explanations and examples.

    Read the article

  • Native Windows Application Development Options

    - by Michael Stum
    Long winded title, short question: If one wants to develop for Windows but not have to rely on any external dependency (no runtime, thus ruling out .net), what supported, alive and fully functioning* alternatives are there? Visual Basic 6 is dead, Visual C++ is obvious and Delphi seems to be the prime choice for that, but I wonder if there are any other alternatives? *as in: Being able to use all the Windows Features like putting an icon in the Notification Area, making the Taskbar Icon flash etc.

    Read the article

  • Ascii Bytes Array To Int32 or Double

    - by Michael Covelli
    I'm re-writing alibrary with a mandate to make it totally allocation free. The goal is to have 0 collections after the app's startup phase is done. Previously, there were a lot of calls like this: Int32 foo = Int32.Parse(ASCIIEncoding.ASCII.GetString(bytes, start, length)); Which I believe is allocating a string. I couldn't find a C# library function that would do the same thing automatically. I looked at the BitConverter class, but it looks like that is only if your Int32 is encoded with the actual bytes that represent it. Here, I have an array of bytes representing Ascii characters that represent an Int32. Here's what I did public static Int32 AsciiBytesToInt32(byte[] bytes, int start, int length) { Int32 Temp = 0; Int32 Result = 0; Int32 j = 1; for (int i = start + length - 1; i >= start; i--) { Temp = ((Int32)bytes[i]) - 48; if (Temp < 0 || Temp > 9) { throw new Exception("Bytes In AsciiBytesToInt32 Are Not An Int32"); } Result += Temp * j; j *= 10; } return Result; } Does anyone know of a C# library function that already does this in a more optimal way? Or an improvement to make the above run faster (its going to be called millions of times during the day probably). Thanks!

    Read the article

  • JNDI / Classpath problem in glassfish

    - by Michael Borgwardt
    I am in the process of converting a large J2EE app from EJB 2 to EJB 3 (all stateless session beans, using glassfish 2.1.1), and running out of ideas. The first EJB I converted (let's call it Foo) ran without major problems (it was the only one in its ejb-module and I could completely replace the deployment descriptor with annotations) and the app ran fine. But after converting the second one (let's call it Bar, one of several in a different ejb-module) there is a weird combination of problems: The app deploys without errors (nothing in the logs either) There is an error when looking up Bar via JNDI When looking at the JNDI tree in the glassfish admin console, Bar is not present at all. Then when I look at the logs, I see this (Foo is the correct name of the EJB's remote interface of the first converted, previously working EJB): Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interface Foo [Root exception is java.lang.ClassNotFoundException: Foo] at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:425) at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:414) at com.sun.enterprise.naming.SerialContext.list(SerialContext.java:603) at javax.naming.InitialContext.list(InitialContext.java:395) at com.sun.enterprise.admin.monitor.jndi.JndiMBeanHelper.getJndiEntriesByContextPath(JndiMBeanHelper.java:106) at com.sun.enterprise.admin.monitor.jndi.JndiMBeanImpl.getNames(JndiMBeanImpl.java:231) ... 68 more Caused by: java.lang.ClassNotFoundException: XXX at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1578) at com.sun.ejb.EJBUtils.getBusinessIntfClassLoader(EJBUtils.java:679) at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:348) ... 75 more This is followed by more exceptions for all the entries that (like Foo) do appear in the JNDI tree. These look like this: Caused by: javax.naming.NotContextException: BarHome cannot be listed at com.sun.enterprise.naming.SerialContext.list(SerialContext.java:607) at javax.naming.InitialContext.list(InitialContext.java:395) at com.sun.enterprise.admin.monitor.jndi.JndiMBeanHelper.getJndiEntriesByContextPath(JndiMBeanHelper.java:106) at com.sun.enterprise.admin.monitor.jndi.JndiMBeanImpl.getNames(JndiMBeanImpl.java:231) ... 68 more However, no exception for Bar, it does not appear in the log at all except one entry during deployment. The other EJBs in the same module do appear, as does Foo. Any ideas what could cause this or how to diagnose it further? The beans are pretty straightforward: @Stateless(name = "Foo") @RolesAllowed("FOOUSER") @TransactionAttribute(TransactionAttributeType.SUPPORTS) public class FooImpl extends BaseBean implements Foo { I'm also having some problems with the deployment descriptor for Bar (I'd like to eliminate it, but glassfish doesn't seem to like having a bean appear only in sun-ejb-jar.xml, or having some beans in a module declared in the descriptor and others use only annotations), but I can't see how that could cause the ClassNotFoundException on Foo. Is there a way to see the ClassPath that Glassfish is actually using?

    Read the article

  • Embedded BI for ASP.NET

    - by Michael Shimmins
    Can anyone recommend a decent business intelligence & reporting application that can be integrated into an OEM application? Primary requirements are: Administrators can define cubes/dimensions etc (or we - the OEM - can predefine some) Report designers can easily inspect data by visually selecting dimensions, filters etc in an adhoc way that is quickly output with little upfront investment Report designers can design a report based on dimensions/filters and save their definition to be run as required Report viewers can view the reports defined by the report designers All of this plus in .NET that can be branded/integrated into our existing web application's look and feel. Permissions need to work off our user/groups system. I've found a few that look good, but they are all in Java and I don't want to ask our clients to install ASP.NET for the app, and then Java, tomcat etc just for reporting. Thanks

    Read the article

  • How to get --detect-branches to work with git-p4?

    - by Michael Brennan
    My p4 repository has a structure similar to: //depot/project/branch1 //depot/project/branch2 //depot/project/branch3 ... etc However, when I use git-p4 to clone "project", all 3 branches are not considered as branches and all get cloned into the single master branch. This is how I'm invoking git-p4: git-p4 clone --detect-branches //depot/project I was expecting git-p4 to create a git database for "project" with three branches, and the root of the project would be mapped to the portion of the path after the branch name (for example: if //depot/project/branch1 has a subdirectory called "lib" (//depot/project/branch1/lib) then my local file system should be something like /git_project/lib with 3 git branches). Is what I'm expecting wrong? Am I invoking git-p4 incorrectly?

    Read the article

  • ClickOnce Deployment Error - Access to the Path is Denied

    - by michael.lukatchik
    I have a WPF app that I'm deploying to a network path using ClickOnce deployment. After the app is deployed to a network location, I use the ClickOnce html page to launch the installation process. I am successfully able to download and install the app. However, my users are not able to download and install the app. When a user navigates to the ClickOnce html page and clicks to begin the installation process, the following error message is received: ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of http://software.mycompany.com/myapp/myapp.application resulted in exception. Following failure messages were detected: + Downloading file://dev/webs/software/myapp/myapp.application did not succeed. * [4/5/2010 1:56:59 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype) - Downloading file://dev/Webs/software/myapp/myapp.application did not succeed. All signs point to this being a security issue. So, I've done the following: Ensured that "Everyone" had read access to the files that were being deployed as part of my project Ensured that "Everyone" had read access to the network location where the app was deployed (//dev/webs/software/myapp) Ensured that "Everyone" had read access to the IIS path where the ClickOnce html page is located In each of these cases, I've made no progress in getting the app to successfully deploy via ClickOnce. Again, the odd thing is that I am able to successfully walk through the process of downloading and installing the app. It's my users, though, that need the ability to download and install the app. I've looked extensively on the web for answers, but there hasn't been much. I'd like to resolve the issue without "re-installing" or "rigging" anything. I need a solid answer. Thank you all for your input!! Mike

    Read the article

  • Understanding glm$residuals and resid(glm)

    - by Michael Bishop
    Hi, Can you tell me what is returned by glm$residuals and resid(glm) where glm is a quasipoisson object. e.g. How would I create them using glm$y and glm$linear.predictors. glm$residuals n missing unique Mean .05 .10 .25 .50 .75 .90 .95 37715 10042 2174 -0.2574 -2.7538 -2.2661 -1.4480 -0.4381 0.7542 1.9845 2.7749 lowest : -4.243 -3.552 -3.509 -3.481 -3.464 highest: 8.195 8.319 8.592 9.089 9.416 resid(glm) n missing unique Mean .05 .10 .25 37715 0 2048 -2.727e-10 -1.0000 -1.0000 -0.6276 .50 .75 .90 .95 -0.2080 0.4106 1.1766 1.7333 lowest : -1.0000 -0.8415 -0.8350 -0.8333 -0.8288 highest: 7.2491 7.6110 7.6486 7.9574 10.1932

    Read the article

  • Using ThreadPool.QueueUserWorkItem in ASP.NET in a high traffic scenario

    - by Michael Hart
    I've always been under the impression that using the ThreadPool for (let's say non-critical) short-lived background tasks was considered best practice, even in ASP.NET, but then I came across this article that seems to suggest otherwise - the argument being that you should leave the ThreadPool to deal with ASP.NET related requests. So here's how I've been doing small asynchronous tasks so far: ThreadPool.QueueUserWorkItem(s => PostLog(logEvent)) And the article is suggesting instead to create a thread explicitly, similar to: new Thread(() => PostLog(logEvent)){ IsBackground = true }.Start() The first method has the advantage of being managed and bounded, but there's the potential (if the article is correct) that the background tasks are then vying for threads with ASP.NET request-handlers. The second method frees up the ThreadPool, but at the cost of being unbounded and thus potentially using up too many resources. So my question is, is the advice in the article correct? If your site was getting so much traffic that your ThreadPool was getting full, then is it better to go out-of-band, or would a full ThreadPool imply that you're getting to the limit of your resources anyway, in which case you shouldn't be trying to start your own threads? Clarification: I'm just asking in the scope of small non-critical asynchronous tasks (eg, remote logging), not expensive work items that would require a separate process (in these cases I agree you'll need a more robust solution).

    Read the article

  • Perl : get substring which matches regex error

    - by Michael Mao
    I am very new to Perl, so please bear with my simple question: Here is the sample output: Most successful agents in the Emarket climate are (in order of success): 1. agent10896761 ($-8008) 2. flightsandroomsonly ($-10102) 3. agent10479475hv ($-10663) Most successful agents in the Emarket climate are (in order of success): 1. agent10896761 ($-7142) 2. agent10479475hv ($-8982) 3. flightsandroomsonly ($-9124) I am interested only in agent names as well as their corresponding balances, so I am hoping to get the following output: agent10896761 -8008 flightsandroomsonly -10102 agent10479475hv -10663 agent10896761 -7142 agent10479475hv -8982 flightsandroomsonly -9124 For later processes. This is the code I've got so far: #!/usr/bin/perl -w open(MYINPUTFILE, $ARGV[0]); while(<MYINPUTFILE>) { my($line) = $_; chomp($line); # regex match test if($line =~ m/agent10479475/) { if($line =~ m/($-[0-9]+)/) { print "$1\n"; } } if($line =~ m/flightsandroomsonly/) { print "$line\n"; } } The second regex match has nothing wrong, 'cause that is printing out the whole line. However, for the first regex match, I've got some other output such like: $ ./compareResults.pl 3.txt 2. flightsandroomsonly ($-10102) 0479475 0479475 3. flightsandroomsonly ($-9124) 1. flightsandroomsonly ($-8053) 0479475 1. flightsandroomsonly ($-6126) 0479475 If I "escape" the braces like this if($line =~ m/\($-[0-9]+\)/) { print "$1\n"; } Then there is never a match for the first regex... So I'm stuck with a problem of making that particular regex work. Any hints for this? Many thanks in advance.

    Read the article

  • onmouseover with django / imagekit

    - by Michael Moreno
    I'm using Imagekit. View.py includes: def pics(request): p = Photo.objects.all() return render_to_response('Shots.html', {'p': p}) The following simple code in the template will generate associated images: {% for p in p %} <img src = "{{ p.display.url }}"> <img src = "{{ p.thumbnail_image.url }}"> {% endfor %} I'm attempting to generate a series of thumbnails {{ p.thumbnail_image.url }} which, when mouseover'd, will generate the slightly larger version of the image, {{ p.display.url }} via Javascript. The following code in the template attempts to do so: <html> <head> <HEAD> <script language="Javascript"> { image1 = new Image image2 = new Image image1.src = {{ p.thumbnail_image.url }} image2.src = {{ p.display.url }} </script> </head> <body> {% for p in p %} <a href="" onMouseOver="document.rollover.src= image2.src onMouseOut="document.rollover.src= image1.src"> <img src="{{ p.thumbnail_image.url }}" border=0 name="rollover"></a> {% endfor %} </body> </html> This will display the series of thumbnails, but the larger image will not display when mouseover'd. I believe it has to do with how I'm specifying the variable {{ p.display.url }}.

    Read the article

  • Populating an NSBrowser (Cocoa OSX)

    - by Michael Minerva
    I want to make a widget that displays a column of selectable text data. It seems that the NSBrowser is the best cocoa object to do this but I cannot figure out how to populate the NSBrowser with any sort of data. I assume I can set the string value of an NsBrowserCell but no where in the documentation can I find where to add a new cell to a column. Am I using the wrong object?

    Read the article

  • $.Post with Form submit

    - by Michael
    ...Some form gets submitted... $.("form").submit(function() { saveFormValues($(this), "./../.."; } function saveFormValues(form, path) { var inputs = getFormData(form); var params = createAction("saveFormData", inputs); var url = path + "/scripts/sessions.php"; $.post(url, params); } The weird thing is that if i add a function to the $.post(url, params, function(data) { alert(data); } I get a blank alert statement. Within scripts/sessions.php i have a function to save whatever the $_POST information is to a file, and the sessions.php never saves this saveFormValues call. It never shows up to the file. But if i keep trying to get it to save, about once every 15 will actually allow it to be saved. This leads me to believe that the forms POST is somehow blocking this value saving post. Any help?

    Read the article

  • create a random sequence, skip to any part of the sequence

    - by Michael Xu
    Hi everyone, In Linux. There is an srand() function, where you supply a seed and it will guarantee the same sequence of pseudorandom numbers in subsequent calls to the random() function afterwards. Lets say, I want to store this pseudo random sequence by remembering this seed value. Furthermore, let's say I want the 100 thousandth number in this pseudo random sequence later. One way, would be to supply the seed number using srand(), and then calling random() 100 thousand times, and remembering this number. Is there a better way of skipping all 99,999 other numbers in the pseudo random list and directly getting the 100 thousandth number in the list. thanks, m

    Read the article

  • IIS7 Web.Config Custom Errors

    - by Michael
    Using GoDaddy to host my site (I know that's my first problem)! :-) Trying to setup customer error messages for my site. GoDaddy allows you to setup a 404 in their control panel, but I can't override this, or setup any additional error redirects, specifically a 500-server error. Here is my web.config file: <configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect to WWW" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^mysite.com$" /> </conditions> <action type="Redirect" url="http://www.mysite.com/{R:0}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> <system.web> <customErrors mode="On" defaultRedirect="http://www.mysite.com/oops.php"> <error statusCode="404" redirect="http://www.mysite.com/oops.php?error=404" /> <error statusCode="500" redirect="http://www.mysite.com/oops.php?error=500" /> </customErrors> </system.web> </configuration>

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >