Search Results

Search found 3227 results on 130 pages for 'anonymous guy'.

Page 9/130 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Linq to XML: create an anonymous object with element attributes and values

    - by Phil Scholtes
    I'm new to Linq and I'm trying to query a XML document to find a list of account managers for a particular user. (I realize it might make more sense to put this in a database or something else, but this scenario calls for a XML document). <user emailAddress='[email protected]'> <accountManager department='Customer Service' title='Manager'>[email protected]</accountManager> <accountManager department='Sales' title='Account Manager'>[email protected]</accountManager> <accountManager department='Sales' title='Account Manager'>[email protected]</accountManager> </user> I trying to create a list of objects (anonymous type?) with properties consisting of both XElement attributes (department, title) and values (email). I know that I can get either of the two, but my problem is selecting both. Here is what I'm trying: var managers = _xDoc.Root.Descendants("user") .Where(d => d.Attribute("emailAddress").Value == "[email protected]") .SelectMany(u => u.Descendants("accountManager").Select(a => a.Value)); foreach (var manager in managers) { //do stuff } I can get at a.Value and a.Attribute but I can't figure out how to get both and store them in an object. I have a feeling it would wind up looking something like: select new { department = u.Attribute("department").Value, title = u.Attribute("title").Value, email = u.Value };

    Read the article

  • Accessing XUL anonymous content using C++

    - by Vaibhav Gade
    Hi All, I am writing Firefox extension using C++. I am trying to access XUL:tabox element in "TabOpen" event handler, but I am unable access any XUL element. I am putting here pseudocode of my extension for reference: HandleEvent() { if (event type is TabOpen) { nsCOMPtr<nsIDOMNode> OriginalNode = do_QueryInterface(event->GetTarget); nsCOMPtr<nsIDOMNodeList> childlist; // // Note here that I got OriginalNode's local name as "tabbrowser" // OriginalNode->GetChildNodes(getter_AddRefs(childlist)); PRUint32 len; childlist->GetLength(&len); // Return 1; consider only "popup" child element. nsString localName; nsCOMPtr<nsIDOMNode> node1; childlist->Item(0, getter_AddRefs(node1)); node1->GetLocalName(localName); // Returns "popup" as the local name. } } By traversing the DOM tree through DOM Inspector, I came to know that XUL elements are anonymous content. How do I access these XUL elements? Very Thanks in advance, Vaibhav.

    Read the article

  • Rspec stubing view for anonymous controller

    - by Colin G
    I'm trying to test a method on the application controller that will be used as a before filter. To do this I have setup an anonymous controller in my test with the before filter applied to ensure that it functions correctly. The test currently looks like this: describe ApplicationController do controller do before_filter :authenticated def index end end describe "user authenticated" do let(:session_id){"session_id"} let(:user){OpenStruct.new(:email => "[email protected]", :name => "Colin Gemmell")} before do request.cookies[:session_id] = session_id UserSession.stub!(:find).with(session_id).and_return(user) get :index end it { should assign_to(:user){user} } end end And the application controller is like this: class ApplicationController < ActionController::Base protect_from_forgery def authenticated @user = nil end end My problem is when ever I run the test I'm getting the following error 1) ApplicationController user authenticated Failure/Error: get :index ActionView::MissingTemplate: Missing template stub_resources/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml], :formats=>[:html], :locale=>[:en, :en]} in view paths "#<RSpec::Rails::ViewRendering::PathSetDelegatorResolver:0x984f310>" According to the docs the view is not rendered when running controller tests however this points to no stub existing for this action (which is understandable as the view doesn't exist) Anyone have a clue how to solve this problem or stub the view out. Cheers Colin G

    Read the article

  • "NT AUTHORITY\ANONYMOUS LOGON" error in Windows 7 (ASP.NET & Web Service)

    - by Tony_Henrich
    I have an asp.net web app which works fine in Windows XP machine in a domain. I am porting it to a Windows 7 stand alone machine. The app uses a web service which makes a call to sql server. The web server (IIS 7.5) and SQL Server are on the same stand alone machine. I enabled Windows authentication for the website and web service. The web service uses a trusted connection connection string. The web service credentials uses System.Net.CredentialCache.DefaultCredentials. I noticed username, password and domainname are blank after the call! The webservice and web site use an application pool with identity "Network Service". I am getting an exception "NT AUTHORITY\ANONYMOUS LOGON" in the database call in the web service. I am assuming it's related to the blank credentials. I am expecting ASPNET user to be the security token to the database. Why is this not happening? (Usually this happens when sql server and web server are on two different machines in a domain, delegation & double hopping, but in my case everything is on a dev box)

    Read the article

  • How to create anonymous objects of type IQueryable using LINQ

    - by Soham Dasgupta
    Hi, I'm working in an ASP.NET MVC project where I have created a two LinqToSQL classes. I have also created a repository class for the models and I've implemented some methods like LIST, ADD, SAVE in that class which serves the controller with data. Now in one of the repository classes I have pulled some data with LINQ joins like this. private HerculesCompanyDataContext Company = new HerculesCompanyDataContext(); private HerculesMainDataContext MasterData = new HerculesMainDataContext(); public IQueryable TRFLIST() { var info = from trfTable in Company.TRFs join exusrTable in MasterData.ex_users on trfTable.P_ID equals exusrTable.EXUSER select new { trfTable.REQ_NO, trfTable.REQ_DATE, exusrTable.USER_NAME, exusrTable.USER_LNAME, trfTable.FROM_DT, trfTable.TO_DT, trfTable.DESTN, trfTable.TRAIN, trfTable.CAR, trfTable.AIRPLANE, trfTable.TAXI, trfTable.TPURPOSE, trfTable.STAT, trfTable.ROUTING }; return info; } Now when I call this method from my controller I'm unable to get a list. What I want to know is without creating a custom data model class how can I return an object of anonymous type like IQueryable. And because this does not belong to any one data model how can refer to this list in the view.

    Read the article

  • Is it possible to have anonymous purchases with ubercart without the creation of a new user account?

    - by DKinzer
    I would like to be able to have anonymous users purchase a product but not have a new account created when they purchase it. Unfortunately the creation of a new user seems to be very tightly integrated into ubercart's ordering system. And, because the order module is part of the ubercart core, it's behavior cannot be overridden easily. One possibility for overriding is the creation of a new user account by supplying ubercart with an bogus anonymous account: hook into hook_form_alter at $form_id == 'uc_cart_checkout_review_form' because this is where ubercart first associates the $order to an uid. Add our submit function to the queue: //Find out if the user is anonymous: global $user; if ($user->uid == 0 ) { //Load a previously created anonymous user account $anonymous_user = mymodule_get_anonymous_user(); //create the order and assign our anonymous_user_id to it $order = uc_order_load($_SESSION['cart_order']); $order->uid = $anonymous_user->uid; uc_order_save($order); //Assign the global user our anonymous user uid $user->uid = $anonymous_user->uid; } But what I really need is to be able to have an anonymous purchase without being forced to create a new account, this solution does not work for me. Apart from which, using this technique will automatically login the anonymous_user into our bogus_anonymous_user account. Which is definitely something I don't want. Is there a better non-duct-tape way around the creation of a new user account for anonymous purchases in ubercart?. AND FYI - at this point I'm kind of stuck with ubercart so I cannot use something else. Thanks! D

    Read the article

  • Infinite loop using Spring Security - Login page is protected even though it should allow anonymous

    - by Tai Squared
    I have a Spring application (Spring version 2.5.6.SEC01, Spring Security version 2.0.5) with the following setup: web.xml <welcome-file-list> <welcome-file> index.jsp </welcome-file> </welcome-file-list> The index.jsp page is in the WebContent directory and simply contains a redirect: <c:redirect url="/login.htm"/> In the appname-servlet.xml, there is a view resolver to point to the jsp pages in WEB-INF/jsp <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> In the security-config.xml file, I have the following configuration: <http> <!-- Restrict URLs based on role --> <intercept-url pattern="/WEB-INF/jsp/login.jsp*" access="ROLE_ANONYMOUS" /> <intercept-url pattern="/WEB-INF/jsp/header.jsp*" access="ROLE_ANONYMOUS" /> <intercept-url pattern="/WEB-INF/jsp/footer.jsp*" access="ROLE_ANONYMOUS" /> <intercept-url pattern="/login*" access="ROLE_ANONYMOUS" /> <intercept-url pattern="/index.jsp" access="ROLE_ANONYMOUS" /> <intercept-url pattern="/logoutSuccess*" access="ROLE_ANONYMOUS" /> <intercept-url pattern="/css/**" filters="none" /> <intercept-url pattern="/images/**" filters="none" /> <intercept-url pattern="/**" access="ROLE_ANONYMOUS" /> <form-login login-page="/login.jsp"/> </http> <authentication-provider> <jdbc-user-service data-source-ref="dataSource" /> </authentication-provider> However, I can't even navigate to the login page and get the following error in the log: WARNING: The login page is being protected by the filter chain, but you don't appear to have anonymous authentication enabled. This is almost certainly an error. I've tried changing the ROLE_ANONYMOUS to IS_AUTHENTICATED_ANONYMOUSLY, changing the login-page to index.jsp, login.htm, and adding different intercept-url values, but I can't get it so the login page is accesible and security applies to the other pages. What do I have to change to avoid this loop?

    Read the article

  • Declare Ajax-webservicecall OnSuccess method anonymous.

    - by user333113
    I write a lot of ajax javascript code and have a little design problem which I'm not totally satisfied with. A lot of times I end up with writing something like this: var typeOfPopup; function RetrievePopupContent(_typeOfPopup) { switch (_typeOfPopup) { case Popup1: WebService.RetrievePopup1Content(param1, param2, DisplayPopup, OnError); break; case Popup2: WebService.RetrievePopup2Content(param1, param2, DisplayPopup, OnError); break; } typeOfPopup = _typeOfPopup; } function DisplayPopup(result) { switch (typeOfPopup) { case Popup1: $get('Popup1').innerHTML = result; break; case Popup2: $get('Popup2').innerHTML = result; break; } Allright. This is a simplified example of what I mean. Often I end up with a lot worse code I believe. What I don't like is the global state variabel outside the functions. One solution I wasn't thinking about when writing this code is to send a context object. I believe you could write something like this: function RetrievePopupContent(typeOfPopup) { switch (typeOfPopup) { case Popup1: WebService.RetrievePopup1Content(param1, param2, DisplayPopup, OnError, typeOfPopup); break; case Popup2: WebService.RetrievePopup2Content(param1, param2, DisplayPopup, OnError, typeOfPopup); break; } } function DisplayPopup(result, typeOfPopup) { switch (typeOfPopup) { case Popup1: $get('Popup1').innerHTML = result; break; case Popup2: $get('Popup2').innerHTML = result; break; } Is this the recommended way? What I also want to do is to be able to write something like this: function RetrievePopupContent(typeOfPopup) { switch (typeOfPopup) { case Popup1: WebService.RetrievePopup1Content(param1, param2, new function(result) { $get('Popup1').innerHTML = result; }, OnError); break; case Popup2: WebService.RetrievePopup2Content(param1, param2, new function(result) { $get('Popup2').innerHTML = result; }, OnError); break; } } Is this possible at all? To declare the callback function anonymous? I am grateful for all opinions on the two options I mentioned myself and also new alternatives to get rid of my global variables I have used this way.

    Read the article

  • {DCC Warning} W1036 Variable '$frame' might not have been initialized?

    - by Gad D Lord
    Any ideas why I get this warning in Delphi XE: [DCC Warning] Form1.pas(250): W1036 Variable '$frame' might not have been initialized procedure TForm1.Action1Execute(Sender: TObject); var Thread: TThread; begin ... Thread := TThread.CreateAnonymousThread( procedure{Anonymos}() procedure ShowLoading(const Show: Boolean); begin /// <------------- WARNING IS GIVEN FOR THIS LINE (line number 250) Thread.Synchronize(Thread, procedure{Anonymous}() begin ... Button1.Enabled := not Show; ... end ); end; var i: Integer; begin ShowLoading(true); try Thread.Synchronize(Thread, procedure{Anonymous}() begin ... // some UI updates end Thread.Synchronize(Thread, procedure{Anonymous}() begin ... // some UI updates end ); finally ShowLoading(false); end; end ).NameThread('Some Thread Name'); Thread.Start; end; I do not have anywhere in my code a variable names frame nor $frame. I am even not sure how $frame with $ sign can be a valid identifier. Smells like compiler magic to me. PS: Of course the real life xosw is having other than Form1, Button1, Action1 names.

    Read the article

  • how to allow unamed user in svn authz file?

    - by dtrosset
    I have a subversion server running with apache. It authenticates users using LDAP in apache configuration and uses SVN authorizations to limit user access to certain repositories. This works perfectly. Apache DAV svn SVNParentPath /srv/svn SVNListParentPath Off SVNPathAuthz Off AuthType Basic AuthName "Subversion Repository" AuthBasicProvider ldap AuthLDAPBindDN # private stuff AuthLDAPBindPassword # private stuff AuthLDAPURL # private stuff Require valid-user AuthzSVNAccessFile /etc/apache2/dav_svn.authz Subversion [groups] soft = me, and, all, other, developpers Adding anonymous access from one machine Now, I have a service I want to setup (rietveld, for code reviews) that needs to have an anonymous access to the repository. As this is a web service, accesses are always done from the same server. Thus I added apache configuration to allow all accesses from this machine. This did not work until I add an additional line in the authorization file to allow read access to user -. Apache <Limit GET PROPFIND OPTIONS REPORT> Order allow,deny Allow from # private IP address Satisfy Any </Limit> Subversion [Software:/] @soft = rw - = r # <-- This is the added line For instance, before I add this, all users were authenticated, and thus had a name. Now, some accesses are done without a user name! I found this - user name in the apache log files. But does this line equals to * = r that I absolutely do not want to enable, or does it only allows the anonymous unnamed user (that is allowed access only from the rietveld server)?

    Read the article

  • As a code monkey, how to discuss programming with a guy who almost has a doctorate in computer science

    - by Peter Turner
    A friend of my wife's is coming over for dinner tonight and he is a lot smarter than me. What do we have in common, well... A Bachelor's in Computer Science, and that should be enough of a conversation starter. But he's nearly completed his doctoral studies and is light years ahead of me in his particular area, which I find fascinating but don't have any legit reason to care about (except for maybe a better way through heavy traffic - he's a combinatorics guy specializing in that I think) and I got married and had some kids and am a professional programmer for medical records software. We've got a lot in common, but there's a point where neither of us care or understand each other - although I really want to learn from him and I'm not certain he'd even want to talk about his work. So for all you doctors or code monkeys, what's a good conversation starter!

    Read the article

  • How do I become a programmer and not some guy that can type some C?

    - by Phoxxent
    From what I understand, programming has a lot more to it than learning syntax, that it involves an understanding of what happens under-the-hood and even more. Currently, I am just a guy that can pump out a few loops in Python or C and maybe make a small-scope Zork clone as the hight of skill. So, what can I do to become an actual programmer? How can I find out what I need to know and learn it? I know this has been vaguely asked before, but I kind of want an answer of how as opposed to the whats that I have seen. Would it be nice to know how real programmers define being a programmer? yes. Is that going to actually help me (or anyone else) learn what they need to learn? no. (well, maybe.)

    Read the article

  • Mount cifs share anonymously

    - by churnd
    I have a Windows 2003 Server sharing out a few folders as read-only to "Everyone". The server is a domain member, so I'm not able to connect to the share on computers that aren't on the domain without passing some form of credentials. I have a linux box that I want to mount the share on at startup, so I want to put the share mountpoint in fstab. I have this setup by specifying a credentials file that is only readable by root, but I would rather either not use a credentials file or specify some guest/anonymous user. Can I do that, & if so, how?

    Read the article

  • How do I protect my company from my IT guy?

    - by Jesse
    I'm going to hire an IT guy to help manage my office's computers and network. We're a small shop, so he'll be the only one doing IT. Of course, I'll interview carefully, check references, and run a background check. But you never know how things will work out. How do I limit my company's exposure if the guy I hire turns out to be evil? How do I avoid making him the single most powerful person in the organization?

    Read the article

  • Which built-in account is used for Anonymous Authentication in IIS 7?

    - by smwikipedia
    We know that Microsoft IIS 7.0 offer a slew of authentication methods such as Anonymous Authentication, Form Based Authentication, Digest Authentication, etc. I read from Professional IIS 7 published by Wrox that: When we use Anonymous Authentication, the end-user does not supply credentials, effectively mak- ing an anonymous request. IIS 7.0 impersonates a fixed user account when attempting to process the request (for example, to read the file off the hard disk). So, what is the fixed user account impersonated by IIS? Where can I see it? If I don't know what this account is, how could I assign proper permissions for the clients who are authenticated as anonymous users? Thanks.

    Read the article

  • Getting Apache to serve same directory with different authentication over SSL?

    - by Lasse V. Karlsen
    I have set up VisualSVN server, a Subversion server that internally uses Apache, to serve my subversion repositories. I've managed to integrate WebSVN into it as well, and just now was able to get it to serve my repositories through WebSVN without having to authenticate, ie. no username or password prompt comes up. This is good. However, with this set up there is apparently no way for me to authenticate to WebSVN at all, which means all my private repositories are now invisible as far as WebSVN goes. I noticed there is a "Listen 81" directive in the .conf file, since I'm running the server on port 81 instead of 80, so I was wondering if I could set up a https:// connection to a different port, that did require authentication? The reason I need access to my private repositories is that I have linked my bug tracking system to the subversion repositories, so if I click a link in the bug tracking system, it will take me to diffs for the relevant files in WebSVN, and some products are in private repositories. Here's my Location section for WebSVN: <Location /websvn/> Options FollowSymLinks SVNListParentPath on SVNParentPath "C:/Repositories/" SVNPathAuthz on AuthName "Subversion Repository" AuthType Basic AuthBasicProvider file AuthUserFile "C:/Repositories/htpasswd" AuthzSVNAccessFile "C:/Repositories/authz" Satisfy Any Require valid-user </Location> Is there any way I can set up a separate section for a different port, say 8100, that does not have the Satisfy Any directive there, which is what enable anonymous access. Note that a different sub-directory on the server is acceptable as well, so /websvn_secure/, if I can make a location section for that and effectively serve the same content only without the Satisfy Any directive, that'd be good too.

    Read the article

  • LINQ - IEnumerable.Join on Anonymous Result Set in VB.NET

    - by user337501
    I've long since built a way around this, but it still keeps bugging me... it doesnt help that my grasp of dynamic LINQ queries is still shakey. For the example: Parent has fields (ParentKey, ParentField) Child has fields (ChildKey, ParentKey, ChildField) Pet has fields (PetKey, ChildKey, PetField) Child has a foreign key reference to Parent on Child.ParentKey = Parent.ParentKey Pet has a foreign key reference to Child on Pet.Childkey = Child.ChildKey Simple enough eh? Lets say I have LINQ like this... Dim Q = FROM p in DataContext.Parent _ Join c In DataContext.Child On c.ParentKey = p.ParentKey Consider this a "base query" on which I will perform other filtering actions. Now I want to join the Pet table like this: Q = Q.Join(DataContext.Pet, _ Function(a) a.c.ChildKey, _ Function(p As Pet) p.ChildKey, _ Function(a, p As Pet) p.ChildKey = a.c.ChildKey) The above Join call doesnt work. I sort of understand why it doesnt work, but hopefully it'll show you how I tried to accomplish this task. After all this was done I would have appended a Select to finish the job. Any ideas on a better way to do this? I tried it with the PredicateBuilder with little success. I might not know how to use it right but it felt like it wasnt gonna handle the joining.

    Read the article

  • C#: Fill DataGridView From Anonymous Linq Query

    - by mdvaldosta
    // From my form BindingSource bs = new BindingSource(); private void fillStudentGrid() { bs.DataSource = Admin.GetStudents(); dgViewStudents.DataSource = bs; } // From the Admin class public static List<Student> GetStudents() { DojoDBDataContext conn = new DojoDBDataContext(); var query = (from s in conn.Students select new Student { ID = s.ID, FirstName = s.FirstName, LastName = s.LastName, Belt = s.Belt }).ToList(); return query; } I'm trying to fill a datagridview control in Winforms, and I only want a few of the values. The code compiles, but throws a runtime error: Explicit construction of entity type 'DojoManagement.Student' in query is not allowed. Is there a way to get it working in this manner?

    Read the article

  • Javascript file as an anonymous function

    - by Andrew Kou
    I have been reading a lot of Javascript lately and I have been noticing that the whole file is wrapped like the following in the .js files to be imported. (function() { ... code ... })() What is the reason for doing this rather than a simple set of constructor functions?

    Read the article

  • anonymous function in SML

    - by vichet
    I have this below function and it works (fn x => x * 2) 2; but for this below one, it is not working (fn x y => x + y ) 2 3; can anyone tell me why? or help give me some hint to get it to work.

    Read the article

  • Fill WinForms DataGridView From Anonymous Linq Query

    - by mdvaldosta
    // From my form BindingSource bs = new BindingSource(); private void fillStudentGrid() { bs.DataSource = Admin.GetStudents(); dgViewStudents.DataSource = bs; } // From the Admin class public static List<Student> GetStudents() { DojoDBDataContext conn = new DojoDBDataContext(); var query = (from s in conn.Students select new Student { ID = s.ID, FirstName = s.FirstName, LastName = s.LastName, Belt = s.Belt }).ToList(); return query; } I'm trying to fill a datagridview control in Winforms, and I only want a few of the values. The code compiles, but throws a runtime error: Explicit construction of entity type 'DojoManagement.Student' in query is not allowed. Is there a way to get it working in this manner?

    Read the article

  • Spring Security Issue: Controller, Anonymous Requests...

    - by Srirangan
    Hey guys, I have an app that uses Spring security and BlazeDS. Flex 3.2 is used for the client app. Generally client app makes service calls using RemoteObjects. However, for certain cases client app is sending a request to a URL. We're using Annotated Controllers for URL mapping. Here's where the "Access is denied" exception comes up: 2010-04-12 11:43:23,486 [qtp5138683-16] ERROR fr.plasticomnium.gpoc.utils.ServiceExceptionInterceptor - Unexpected RuntimeException : Access is denied org.springframework.security.access.AccessDeniedException: Access is denied at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:71) at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:203) at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at fr.plasticomnium.gpoc.utils.ServiceExceptionInterceptor.invoke(ServiceExceptionInterceptor.java:15) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ... ...

    Read the article

  • anonymous problem in linq query

    - by ognjenb
    var query2 = from i in proba.id_person select i.id; foreach (var k in query2) { var upit = from l in proba.name join f in proba1.last_name on l.id equals f.id where l.id == k select new { l.ime, f.prezime }; foreach (var g in upit) { model.Add(new ViewModel { Name = g.ime, last_name = g.prezime, id_person = k }); } } return View(model); Why I have this error: The specified LINQ expression contains references to queries that are associated with different contexts.

    Read the article

  • WPF: UnauthorizedAccessException using anonymous methods.

    - by Diego Pacheco Pedemonte
    Here is the thing, I want to create a simply app that copy many files from one site, and move them to another; but using async methods and create a new thread. private void button3_Click(object sender, RoutedEventArgs e) { //progressBar1.Maximum = _FileInfoArray.Count; DispatcherTimer dt1 = new DispatcherTimer(); foreach (FileInfo Fi in _FileInfoArray) { Thread t = new Thread(new ThreadStart(delegate() { DispatcherOperation _dispOp = progressBar1.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(delegate() { File.Copy(txtdestino.Text, Fi.FullName, true); //progressBar1.Value = n; //txtstatus.Content = ("Copiados " + n.ToString() + " archivos"); //Thread.Sleep(100); } )); _dispOp.Completed += new EventHandler(_dispOp_Completed); } )); t.Start(); } } UnauthorizedAccessException is throw! It says that I can't access to txtdestino content. Some clues? -------------------------------------------------------------------------------Edited This is the version with all the changes, get the same error :( any clues? private void button4_Click(object sender, RoutedEventArgs e) { //First: Build mynames List<string> mynames = new List<string>(); foreach (FileInfo fi in _FileInfoArray) { mynames.Add(fi.FullName); } Thread t = new Thread(new ThreadStart(delegate() { foreach (string fullname in mynames) { DispatcherOperation _dispOp = progressBar1.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(delegate() { string destino = System.IO.Path.Combine(@"C:\", System.IO.Path.GetFileName(fullname)); File.Copy(fullname, destino, true); //Some progressbar changes } )); _dispOp.Completed += new EventHandler(_dispOp_Completed); } } )); t.Start(); } File.Copy(txtdestino.Text, Fi.FullName, true); // here the exception is throw

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >