Search Results

Search found 3838 results on 154 pages for 'throws'.

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

  • The youtube API sometimes throws error: Call to a member function children() on a non-object

    - by Anna Lica
    When i launch the php script, sometime works fine, but many other times it retrieve me this errror Fatal error: Call to a member function children() on a non-object in /membri/americanhorizon/ytvideo/rilevametadatadaurlyoutube.php on line 21 This is the first part of the code // set feed URL $feedURL = 'http://gdata.youtube.com/feeds/api/videos/dZec2Lbr_r8'; // read feed into SimpleXML object $entry = simplexml_load_file($feedURL); $video = parseVideoEntry($entry); function parseVideoEntry($entry) { $obj= new stdClass; // get nodes in media: namespace for media information $media = $entry->children('http://search.yahoo.com/mrss/'); //<----this is the doomed line 21 UPDATE: solution adopted for ($i=0 ; $i< count($fileArray); $i++) { // set feed URL $feedURL = 'http://gdata.youtube.com/feeds/api/videos/'.$fileArray[$i]; // read feed into SimpleXML object $entry = simplexml_load_file($feedURL); if ( is_object($entry)) { $video = parseVideoEntry($entry); echo ($video->description."|".$video->length); echo "<br>"; } else { $i--; } } In this mode i force the script to re-check the file that caused the error

    Read the article

  • MyMessage<T> throws an exception when calling XmlSerializer

    - by Arthis
    I am very new to nservicebus. I am using version 3.0.1, the last one up to date. And I wonder if my case is a normal limitation of NSB, I am not aware of. I have an asp.net MVC application, I am trying to setup and in my global.asax, I have the following : var configure = Configure.WithWeb() .DefaultBuilder() .ForMvc() .XmlSerializer(); But I have an error with the XmlSerializer when dealing with one of my object: [Serializable] public class MyMessage<T> : IMessage { public T myobject { get; set; } } I pass trough : XmlSerializer() instance.Initialize(types); this.InitType(type, moduleBuilder); this.InitType(info2.PropertyType, moduleBuilder); and then when dealing With T, string typeName = GetTypeName(t); typename is null and the following instruction : if (!nameToType.ContainsKey(typeName)) ends in error. null value not allowed. Is this some limitations to Nservicebus, or am I messing something up?

    Read the article

  • Exception throws There is no row at position 0

    - by Nimantha Prasad
    I wanted to check user is valid or not.it gives me the exception,When user valid it's working without issue,But if user invalid there's some issue. Exception is : There is no row at position 0 Here is the part of the code, public bool CheckUserExistAndReporter(string user) { int reporterDnnId = -1; SMSFunctionController mysms = new SMSFunctionController(); DataSet uds = mysms.GetUsersUnitByUserName(user); reporterDnnId = Convert.ToInt32(uds.Tables[0].Rows[0]["DnnUserID"]); if (reporterDnnId > 0) { bool isValidUser = true; return isValidUser; } //else //{ //bool isValidUser =false; //return isValidUser; // } return false; } Then i call thatone here. if (!CheckUserExistAndReporter(user)) { ErrorLog(messageIn); msgOut = "ugyldig Bruker";//Invalid User. } what is the error ?

    Read the article

  • FindControl() method throws ArithmeticException?

    - by Mark Struzinski
    I have a line of C# in my ASP.NET code behind that looks like this: DropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl("ddlStates"); The DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormView control. When my code hits this line, I am getting an ArithmeticException with the message "Value was either too large or too small for an Int32." This code has worked previously, and is in production right now. I fired up VS2008 to make some changes to the site, but before I changed anything, I got this exception from the page. Anyone seen this one before?

    Read the article

  • When SET SCAN ON used after END throws error

    - by Karthik
    Hi, Im trying to use SET SCAN ON after as follows.. SET SCAN OFF; DECLARE -- declared a variable BEGIN --update statement END; SET SCAN ON; The use of SET SCAN ON; is causing the error when i try to run the script. The error captured ORA-06550: line 16, column 1: PLS-00103: Encountered the symbol "SET" 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action:

    Read the article

  • boost::asio::io_service throws exception

    - by Ace
    Okay, I seriously cannot figure this out. I have a DLL project in MSVC that is attempting to use Asio (from Boost 1.45.0), but whenever I create my io_service, an exception is thrown. Here is what I am doing for testing purposes: void run() { boost::this_thread::sleep(boost::posix_time::seconds(5)); try { boost::asio::io_service io_service; } catch (std::exception & e) { MessageBox(NULL, e.what(), "Exception", MB_OK); } } BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { if (fdwReason == DLL_PROCESS_ATTACH) { boost::thread thread(run); } return TRUE; } This is what the message box shows: winsock: WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable Here is what MSDN says about it (error code 10091, WSASYSNOTREADY): Network subsystem is unavailable. This error is returned by WSAStartup if the Windows Sockets implementation cannot function at because the underlying system it uses to provide network services is currently unavailable. Users should check: That the appropriate Windows Sockets DLL file is in the current path. That they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one Winsock DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded. The Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly. Yet none of this seems to apply to me (or so I think). Here is my command line: /O2 /GL /D "_WIN32_WINNT=0x0501" /D "_WINDLL" /FD /EHsc /MD /Gy /Fo"Release\" /Fd"Release\vc90.pdb" /W3 /WX /nologo /c /TP /errorReport:prompt If anyone knows what might be wrong, please help me out! Thanks.

    Read the article

  • Variable from block is put into a calculation but throws off wrong reading

    - by user2926620
    I am having troubles with trying to retrieve a double variable that is already established outside the block and called inside but I want to return the value of the same variable so that I can apply it to a calculation. the variable that I want returned is: double quarter = 0; but when I plug it into quarter in my first else/if statement, it plugs in 0 and not the value in my switch block. What can I do to retrieve the value? double quarter = 0; //Date entry will be calculated by how much KW user enters switch (input) { case "2/15/13": quarter = kwUsed * 0.10; break; case "4/15/13": quarter = kwUsed * 0.12; break; case "8/15/13": quarter = kwUsed * 0.15; break; case "11/15/13": quarter = kwUsed * 0.15; break; default: System.out.println("Invalid date"); } //Declaring variables for calculations double base = 0; double over = 0; double excess = 0; double math1 = 0; double math2 = 0; //KW Calculations if (kwUsed <= 350) { base = quarter; }else if (kwUsed <= 500) { math1 = ((kwUsed - 350) * quarter); base = ((kwUsed * quarter) - math1); over = ((math1 * 0.1) + math1); }else if (kwUsed > 500) { math2 = ((kwUsed - 350) * 0.1); base = ((kwUsed * 0.1) - math2); math2 = ((kwUsed -350) - 50); over = ((math2 * 0.1) + (15 * 0.1)); double math3 =((kwUsed - 500) * 0.1); excess = ((math3 * 0.25) + math3); } Edited to clarify question.

    Read the article

  • DBTransaction Rollback throws

    - by pdiddy
    Looking into the documentation it says that the Rollback method can throw when the transaction is not in pending state (after begin transaction and before commit transaction). I can't seem to find a way to check whether the transaction can be rollback or not. There isn't a state property either.

    Read the article

  • jquery draggable throws error when 'mouseup' is triggered

    - by Moustard
    If you build a simple dragger: $(document).ready( function() { $('#tomove').draggable( { axis: 'x', drag: function(event, ui) { mouseUp(); } }); } ); And you try to stop it programmatically: function mouseUp() { if($('#tomove').offset().left 400) { $('#tomove').trigger('mouseup'); } } You will get this message in error console: this.helper is null Is there any way to fix this? Thanks for your help.

    Read the article

  • Examples of bad variable names and reasons [on hold]

    - by user470184
    I'll start with a class in the jdk package : public final class Sdp { should be : public final class SocketsDirectProtocol { Sdp is class name, this is ambigious, should be : Class<?> cl = Class.forName("java.net.SdpSocketImpl", true, null); should be : Class<?> clazz = Class.forName("java.net.SdpSocketImpl", true, null); cl is ambiguous private static void setAccessible(final AccessibleObject o) { should be : private static void setAccessible(final AccessibleObject accessibleObject) { There are various other examples in this class, do you have similar and/or differing examples of variables that were named badly ? package com.oracle.net; public final class Sdp { private Sdp() { } /** * The package-privage ServerSocket(SocketImpl) constructor */ private static final Constructor<ServerSocket> serverSocketCtor; static { try { serverSocketCtor = (Constructor<ServerSocket>) ServerSocket.class.getDeclaredConstructor(SocketImpl.class); setAccessible(serverSocketCtor); } catch (NoSuchMethodException e) { throw new AssertionError(e); } } /** * The package-private SdpSocketImpl() constructor */ private static final Constructor<SocketImpl> socketImplCtor; static { try { Class<?> cl = Class.forName("java.net.SdpSocketImpl", true, null); socketImplCtor = (Constructor<SocketImpl>)cl.getDeclaredConstructor(); setAccessible(socketImplCtor); } catch (ClassNotFoundException e) { throw new AssertionError(e); } catch (NoSuchMethodException e) { throw new AssertionError(e); } } private static void setAccessible(final AccessibleObject o) { AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { o.setAccessible(true); return null; } }); } /** * SDP enabled Socket. */ private static class SdpSocket extends Socket { SdpSocket(SocketImpl impl) throws SocketException { super(impl); } } /** * Creates a SDP enabled SocketImpl */ private static SocketImpl createSocketImpl() { try { return socketImplCtor.newInstance(); } catch (InstantiationException x) { throw new AssertionError(x); } catch (IllegalAccessException x) { throw new AssertionError(x); } catch (InvocationTargetException x) { throw new AssertionError(x); } } /** * Creates an unconnected and unbound SDP socket. The {@code Socket} is * associated with a {@link java.net.SocketImpl} of the system-default type. * * @return a new Socket * * @throws UnsupportedOperationException * If SDP is not supported * @throws IOException * If an I/O error occurs */ public static Socket openSocket() throws IOException { SocketImpl impl = createSocketImpl(); return new SdpSocket(impl); } /** * Creates an unbound SDP server socket. The {@code ServerSocket} is * associated with a {@link java.net.SocketImpl} of the system-default type. * * @return a new ServerSocket * * @throws UnsupportedOperationException * If SDP is not supported * @throws IOException * If an I/O error occurs */ public static ServerSocket openServerSocket() throws IOException { // create ServerSocket via package-private constructor SocketImpl impl = createSocketImpl(); try { return serverSocketCtor.newInstance(impl); } catch (IllegalAccessException x) { throw new AssertionError(x); } catch (InstantiationException x) { throw new AssertionError(x); } catch (InvocationTargetException x) { Throwable cause = x.getCause(); if (cause instanceof IOException) throw (IOException)cause; if (cause instanceof RuntimeException) throw (RuntimeException)cause; throw new RuntimeException(x); } } /** * Opens a socket channel to a SDP socket. * * <p> The channel will be associated with the system-wide default * {@link java.nio.channels.spi.SelectorProvider SelectorProvider}. * * @return a new SocketChannel * * @throws UnsupportedOperationException * If SDP is not supported or not supported by the default selector * provider * @throws IOException * If an I/O error occurs. */ public static SocketChannel openSocketChannel() throws IOException { FileDescriptor fd = SdpSupport.createSocket(); return sun.nio.ch.Secrets.newSocketChannel(fd); } /** * Opens a socket channel to a SDP socket. * * <p> The channel will be associated with the system-wide default * {@link java.nio.channels.spi.SelectorProvider SelectorProvider}. * * @return a new ServerSocketChannel * * @throws UnsupportedOperationException * If SDP is not supported or not supported by the default selector * provider * @throws IOException * If an I/O error occurs */ public static ServerSocketChannel openServerSocketChannel() throws IOException { FileDescriptor fd = SdpSupport.createSocket(); return sun.nio.ch.Secrets.newServerSocketChannel(fd); } }

    Read the article

  • How do I set values for a class without using any setter methods?

    - by fari
    Please can anyone help me public class KalaGameState implements Cloneable { // your code goes here public KalaGameState(int startingStones) throws InvalidStartingStonesException { // your code goes here } public int getTurn() { // your code goes here } public int getKala(int playerNum) throws IllegalPlayerNumException { // your code goes here } public int getNumStones(int sidePitNum) throws IllegalSidePitNumException { // your code goes here } public int getNumStones(int playerNum, int sidePitNum) throws IllegalPlayerNumException, IllegalSidePitNumException { // your code goes here } public int getScore(int playerNum) throws IllegalPlayerNumException { // your code goes here } private int getSidePitArrayIndex(int sidePitNum) throws IllegalSidePitNumException { // your code goes here } public boolean gameOver() { // your code goes here } public void makeMove(int sidePitNum) throws IllegalSidePitNumException, IllegalMoveException { // your code goes here } }

    Read the article

  • IIS throws HTTP Error 503. The service is unavailable after installation of windows 8

    - by Floran
    I was using IIS7.5 on Windows 7. Everything worked great. I then installed Windows 8. The shortcut link to my IIS7.5 stopped working, because all this was apparently moved to a windows.old folder. I had to install IIS8 via the 'turn Windows features on/off'. After I did that, I saw my sites again and everything looked ok, until I browsed to a site and got the error: Service Unavailable HTTP Error 503. The service is unavailable. I restarted IIS, restarted my PC, restarted the single site, but the problem remains. I also tried looking at the event logs. My eventlogs used to be in C:\inetpub\logs\LogFiles\W3SVC4, but I don't see any log of today in there. Maybe that has changed with the new IIS as well? If so, where are the eventlogs now or where can I see where they should be saved?

    Read the article

  • Is it a bad idea if equals(null) throws NullPointerException instead?

    - by polygenelubricants
    The contract of equals with regards to null, is as follows: For any non-null reference value x, x.equals(null) should return false. This is rather peculiar, because if o1 != null and o2 == null, then we have: o1.equals(o2) // returns false o2.equals(o1) // throws NullPointerException The fact that o2.equals(o1) throws NullPointerException is a good thing, because it alerts us of programmer error. And yet, that error would not be catched if for various reasons we just switched it around to o1.equals(o2), which would just "silently fail" instead. So the questions are: Why is it a good idea that o1.equals(o2) should return false instead of throwing NullPointerException? Would it be a bad idea if wherever possible we rewrite the contract so that anyObject.equals(null) always throw NullPointerException instead?

    Read the article

  • How does C++ free the memory when a constructor throws an exception and a custom new is used

    - by Joshua
    I see the following constructs: new X will free the memory if X constructor throws. operator new() can be overloaded. The canonical definition of an operator new overload is void *operator new(heap h) and the corrisponding operator delete. The most common operator new overload is pacement new, which is void *operator new(void *p) { return p; } You almost always cannot call delete on the pointer given to placement new. This leads to a single question. How is memory cleaned up when X constructor throws and an overloaded new is used?

    Read the article

  • git post-receive hook throws "command not found" error but seems to run properly and no errors when run manually

    - by Ben
    I have a post-receive hook that runs on a central git repository set up with gitolite to trigger a git pull on a staging server. It seems to work properly, but throws a "command not found" error when it is run. I am trying to track down the source of the error, but have not had any luck. Running the same commands manually does not produce an error. The error changes depending on what was done in the commit that is being pushed to the central repository. For instance, if 'git rm ' was committed and pushed to the central repo the error message will be "remote: hooks/post-receive: line 16: Removed: command not found" and if 'git add ' was committed and pushed to the central repo the error message will be "remote: hooks/post-receive: line 16: Merge: command not found". In either case the 'git pull' run on the staging server works correctly despite the error message. Here is the post-receive script: #!/bin/bash # # This script is triggered by a push to the local git repository. It will # ssh into a remote server and perform a git pull. # # The SSH_USER must be able to log into the remote server with a # passphrase-less SSH key *AND* be able to do a git pull without a passphrase. # # The command to actually perform the pull request on the remost server comes # from the ~/.ssh/authorized_keys file on the REMOTE_HOST and is triggered # by the ssh login. SSH_USER="remoteuser" REMOTE_HOST="staging.server.com" `ssh $SSH_USER@$REMOTE_HOST` # This is line 16 echo "Done!" The command that does the git pull on the staging server is in the ssh user's ~/.ssh/authorized_keys file and is: command="cd /var/www/staging_site; git pull",no-port-forwarding,no-X11-forwarding,no-agent-forwarding, ssh-rsa AAAAB3NzaC1yc2EAAAABIwAA... (the rest of the public key) This is the actual output from removing a file from my local repo, committing it locally, and pushing it to the central git repo: ben@tamarack:~/thejibe/testing/web$ git rm ./testing rm 'testing' ben@tamarack:~/thejibe/testing/web$ git commit -a -m "Remove testing file" [master bb96e13] Remove testing file 1 files changed, 0 insertions(+), 5 deletions(-) delete mode 100644 testing ben@tamarack:~/thejibe/testing/web$ git push Counting objects: 3, done. Delta compression using up to 2 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 221 bytes, done. Total 2 (delta 1), reused 0 (delta 0) remote: From [email protected]:testing remote: aa72ad9..bb96e13 master -> origin/master remote: hooks/post-receive: line 16: Removed: command not found # The error msg remote: Done! To [email protected]:testing aa72ad9..bb96e13 master -> master ben@tamarack:~/thejibe/testing/web$ As you can see the post-receive script gets to the echo "Done!" line and when I look on the staging server the git pull has been successfully run, but there's still that nagging error message. Any suggestions on where to look for the source of the error message would be greatly appreciated. I'm tempted to redirect stderr to /dev/null but would prefer to know what the problem is.

    Read the article

  • git post-receive hook throws "command not found" error but seems to run properly and no errors when run manually

    - by Ben
    I have a post-receive hook that runs on a central git repository set up with gitolite to trigger a git pull on a staging server. It seems to work properly, but throws a "command not found" error when it is run. I am trying to track down the source of the error, but have not had any luck. Running the same commands manually does not produce an error. The error changes depending on what was done in the commit that is being pushed to the central repository. For instance, if 'git rm ' was committed and pushed to the central repo the error message will be "remote: hooks/post-receive: line 16: Removed: command not found" and if 'git add ' was committed and pushed to the central repo the error message will be "remote: hooks/post-receive: line 16: Merge: command not found". In either case the 'git pull' run on the staging server works correctly despite the error message. Here is the post-receive script: #!/bin/bash # # This script is triggered by a push to the local git repository. It will # ssh into a remote server and perform a git pull. # # The SSH_USER must be able to log into the remote server with a # passphrase-less SSH key *AND* be able to do a git pull without a passphrase. # # The command to actually perform the pull request on the remost server comes # from the ~/.ssh/authorized_keys file on the REMOTE_HOST and is triggered # by the ssh login. SSH_USER="remoteuser" REMOTE_HOST="staging.server.com" `ssh $SSH_USER@$REMOTE_HOST` # This is line 16 echo "Done!" The command that does the git pull on the staging server is in the ssh user's ~/.ssh/authorized_keys file and is: command="cd /var/www/staging_site; git pull",no-port-forwarding,no-X11-forwarding,no-agent-forwarding, ssh-rsa AAAAB3NzaC1yc2EAAAABIwAA... (the rest of the public key) This is the actual output from removing a file from my local repo, committing it locally, and pushing it to the central git repo: ben@tamarack:~/thejibe/testing/web$ git rm ./testing rm 'testing' ben@tamarack:~/thejibe/testing/web$ git commit -a -m "Remove testing file" [master bb96e13] Remove testing file 1 files changed, 0 insertions(+), 5 deletions(-) delete mode 100644 testing ben@tamarack:~/thejibe/testing/web$ git push Counting objects: 3, done. Delta compression using up to 2 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 221 bytes, done. Total 2 (delta 1), reused 0 (delta 0) remote: From [email protected]:testing remote: aa72ad9..bb96e13 master -> origin/master remote: hooks/post-receive: line 16: Removed: command not found # The error msg remote: Done! To [email protected]:testing aa72ad9..bb96e13 master -> master ben@tamarack:~/thejibe/testing/web$ As you can see the post-receive script gets to the echo "Done!" line and when I look on the staging server the git pull has been successfully run, but there's still that nagging error message. Any suggestions on where to look for the source of the error message would be greatly appreciated. I'm tempted to redirect stderr to /dev/null but would prefer to know what the problem is.

    Read the article

  • Saving image to the existing file throws "A generic error occurred in GDI+" error.

    - by ryan
    i am trying to create a overlapped image using different images,then saving to a particular location. so that i can use generated image(overlapped img) in my telerik reporting. it is important to me to save the overlapped image to the same location with same name. but generating this overlapped image second time throws throws "A generic error occurred in GDI+" error. Please help me with this. It seems i can not override the existing image file. i tried deleting the existing image every time i generate the new one. but its not allowing me deleting the file ,may be it is used by telerik reporting. Here is the image create method which takes the baseimage path, sectionimage path and the reportimage path (this is the target locationenter code here) public static void Creat(List<string> sectionNames, string reportImagePath, string baseImagePath) { var file = Image.FromFile(baseImagePath); Graphics g = Graphics.FromImage(file); foreach (var sectionName in sectionNames) { var image = Image.FromFile(sectionName); g.DrawImage(image, new PointF(0.0F, 0.0F)); } file.Save(reportImagePath, ImageFormat.Png); file.Dispose(); }

    Read the article

  • Image.Save(..) throws a GDI+ exception because the memory stream is closed.

    - by Pure.Krome
    Hi folks, i've got some binary data which i want to save as an image. When i try to save the image, it throws an exception if the memory stream used to create the image, was closed before the save. The reason i do this is because i'm dynamically creating images and as such .. i need to use a memory stream. this is the code: [TestMethod] public void TestMethod1() { // Grab the binary data. byte[] data = File.ReadAllBytes("Chick.jpg"); // Read in the data but do not close, before using the stream. Stream originalBinaryDataStream = new MemoryStream(data); Bitmap image = new Bitmap(originalBinaryDataStream); image.Save(@"c:\test.jpg"); originalBinaryDataStream.Dispose(); // Now lets use a nice dispose, etc... Bitmap2 image2; using (Stream originalBinaryDataStream2 = new MemoryStream(data)) { image2 = new Bitmap(originalBinaryDataStream2); } image2.Save(@"C:\temp\pewpew.jpg"); // This throws the GDI+ exception. } Does anyone have any suggestions to how i could save an image with the stream closed? I cannot rely on the developers to remember to close the stream after the image is saved. In fact, the developer would have NO IDEA that the image was generated using a memory stream (because it happens in some other code, elsewhere). I'm really confused :(

    Read the article

  • Is there a reason Image.FromFile throws an OutOfMemoryException for an invalid image format?

    - by Arc
    I am writing code that catches this OutOfMemoryException and throws a new, more intuitive exception: /// ... /// <exception cref="FormatException">The file does not have a valid image format.</exception> public static Image OpenImage( string filename ) { try { return Image.FromFile( filename, ); } catch( OutOfMemoryException ex ) { throw new FormatException( "The file does not have a valid image format.", ex ); } } Is this code acceptable to its user, or is OutOfMemoryException intentionally being thrown for a particular reason?

    Read the article

  • Why can one null return be tested but another throws an exception?

    - by mickey
    I want to test if an xml attribute is present. Given this: XmlAttributeCollection PG_attrColl = SomeNodeorAnother.Attributes; This first test works: if (null != PG_attrColl["SomeAttribute"]) "GetNamedItem" is supposed to return null, but the following test throws an exception complaining about the null it returns. if (null != PG_attrColl.GetNamedItem("SomeAttribute").Value;) Why the difference? Just curious.

    Read the article

  • HELP! WebClient.UploadFile() throws exception while uploading files to sharepoint

    - by Royson
    In my application i am uploading files to sharepoint 2007. I am using using (WebClient webClient = new WebClient()) { webClient.Credentials = new NetworkCredential(userName, password); webClient.Headers.Add("Content-Type", "application/x-vermeer-urlencoded"); webClient.Headers.Add("X-Vermeer-Content-Type", "application/x-vermeer-urlencoded"); String result = Encoding.UTF8.GetString(webClient.UploadData(webUrl + "/_vti_bin/_vti_aut/author.dll","POST", data.ToArray())); } the code is running successfully..but for some files it throws exception The underlying connection was closed: The connection was closed unexpectedly. at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data) at System.Net.WebClient.UploadData(String address, String method, Byte[] data) Any Ideas what I have done wrong? I am using VS-2008 2.0

    Read the article

  • Accessing Singleton Instance Variable in Class Methods Throws Warning?

    - by Ross
    Hello, I've using the Objective-C singleton from here at stackoverflow. The singleton in the class method accesses it's instance variable, which works, but throws a complie warning. How should I be doing this? Is there a way to do this without accessing the sharedInstance: in each class method? for example here is my class method: + (NSString *)myClassMethods { [instanceDateFormatter setFormat:@"MM"]; return [instanceDateFormatter stringWithDate:somedate]; } line 2 will have the complie warning. Thanks, Ross

    Read the article

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