SyntaxFix
Write A Post
Hire A Developer
Questions
It means you have a null reference somewhere in there. Can you debug the app and stop the debugger when it gets here and investigate? Probably img1 is null or ConfigurationManager.AppSettings.Get("Url") is returning null.
img1
ConfigurationManager.AppSettings.Get("Url")