Errors

Jun 12, 2009 at 3:11 PM

Hi,

I have been using this framework for a week or so within my ASP.net site and it has been really useful. Unfortunately today it seems that I can only connect intermittently. The majority of the time I am getting these messages:

"The remote server returned an error: (500) Internal Server Error."

"The remote server returned an error: (400) Bad Request."

I been testing this trying just to login and print the userid and then logout, but nine times out of ten I get one of the above error messages. This was all working fine a couple of days ago without a problem and today this has happened. Does anyone have any ideas on what the problem could be?

 

Thanks

Davinder

Coordinator
Jun 12, 2009 at 7:19 PM

Hi.

 

I’ve had a problem like this before, a month back or so. Back then I email smugmug and looked on dgrin (a lot of people had the same issued with login) and smugmug support said they had some problems they where fixing, concernaing a new release or something like that. It might be something similar. But it might not so I will look into this today and let you know.

Thanks for using the framework and glad is helps!

 

Maria

Jun 14, 2009 at 3:26 PM

Thanks Maria,

 

I've had a look on dgrin and on Thurday night they were doing some maintenance and changed the IP address of the api so this could be the issue given that the code does work sometimes. I've tried flushing my DNS cache but that has made no difference.

I've also downloaded the very latest source code off this site and run the provided test app, but this also has the same problem, will work once or twice but most of the time returns an error! So I'm not sure what to try next.

 

Davinder

Coordinator
Jun 15, 2009 at 7:33 PM

Hi.

I have the same problems. Almost always it doesn’t login. I've seen the dgrin comments, I tried flushing the DNS, returning to previous versions of code. I can’t see what the error is, it is clearly on Smugmug’s part, something they changed, but not being able to see clearly when the error appears it’s hard to explain to them and it’s probably hard for them to repro and see what it is and fix it, or tell us what we need to fix. I hope they find it fast, because I can’t use my app either. I’m trying to see when the error appears so I can help, but till now I’ve had no luck.

Sorry for the trouble and I hope for a quick fix.

Maria

Coordinator
Jun 16, 2009 at 6:45 AM

Looking at other posts on DGrin I noticed that someone said it might be related to going to different servers and that one works and the other one doesn’t. That actually made a lot of sense as they can be configured differently. So tonight, as I got a chance, I checked it out. The same things that he said are true for me. If the server my calls hit is Apache, everything works just fine, as soon as a call goes to AkamaiGHost server, I get the 500 Internal Server Error. I posted this on DGrin as well, in the hope that the more people tell them, the quicker they'll know what it is and fix it.

Jun 16, 2009 at 9:31 PM

I was messing around and found that GET requests were always working but sometimes POST requests would end up bad. So I edited the source to use GET instead of POST and it is now working consistently. I have done nothing to check that this will always work (just doing my own stuff it is so far), but if someone who knows more about this wants to look into it, it might be a possible fix.

Coordinator
Jun 16, 2009 at 10:56 PM

I’m not exactly sure what you are doing there. Are you using my framework? Do you have an app that only displays public things, or doesn’t make any changes? GET is usually used for a safe interaction, like a read, query, and POST for a change request, order, etc.

Jun 17, 2009 at 1:40 AM

Its read only, as you suspected. I just wanted to point out that what kept giving me errors with POST worked when I changed the request to GET. Other than that, I have very little understanding of the framework, just needed these few things to work reliably.

Jun 17, 2009 at 10:31 AM

Hi mariagh,

Thanks for looking into this for me, I've had to come up with a different way to store my pics and videos for now (not using smugmug). I will eventually need to use smugmug and the framework, so hopefully this issue gets resolved soon. If I come across anything that might help I'll post it here.

Thanks

Davinder

Coordinator
Jun 17, 2009 at 6:55 PM

I hope that too! The SmugMug guys are working on it.  I'll post here when it's solved.

Thanks,

Maria

Coordinator
Jun 23, 2009 at 7:10 PM
Hi.

For two days now it's all working well, all my tests run successfully and the app I use to manage my galleries also works just fine. I've let them run for some time since yesterday to make sure that they always work. As I've noticed, my API calls only hit the Apache server now.
It's unlikely to get any errors now, so enjoy the framework :D and glad it helps others as well.

Thanks.
Dec 14, 2009 at 11:40 AM

Hi Alex,

This code is working ok for creating new album & upload images in same. I am trying to upload images in existing album by below code. All albums are retreived but, it gave error in last that "invalid album id". Please help.

            List<Album> objalbum = objUser.GetAlbums(true);
            Album oblAlb = new Album();
            oblAlb.id = objalbum[0].id;
            oblAlb.Key = objalbum[0].Key;
            var up = oblAlb.CreateUploader();
            up.UploadCompleted += new EventHandler<UploadEventArgs>(img_UploadCompleted);
            up.UploadProgress += new EventHandler<UploadEventArgs>(img_UploadProgress);
            String img1 = "C:\\launch.jpg";
            up.UploadImage(img1);


Looking forward to your response.


Thanks
Munish Singla

Coordinator
Dec 1, 2010 at 7:40 PM

Wow. After a million years, I respond to your question. This discussion thread was probably closed and I never got your question on my email, nor did I think of looking on an old discussion topic that I had already solved. Next time, just start a new thread, your question isn’t related to this one anyways :)

Try this instead:
List<Album> objalbum = objUser.GetAlbums(true);
Album oblAlb = objalbum[0];
var up = oblAlb.CreateUploader();
String img1 = "C:\\launch.jpg";
up.UploadImage(img1);

If this doesn't work. Make sure that you actually have object in the objalbum list. It might be that the GetAlbums method is failing.

Maria