N
NitLions
Guest
Hi all,
I'm getting the object reference not set to an instance of an object error in teh following code...
private void AddRewriteRule(string port, string avPort, string ruleName, string ruleUrlMatch)
{
using (ServerManager serverManager = new ServerManager())
{
Site site = serverManager.Sites.FirstOrDefault(s => s.Bindings.ElementAt(0).EndPoint.Port == Int32.Parse(port));
string siteName = site.Name;
I think its blowing up at the highlighted code and may have something to do with Int32.Parse. ??
I had a troubleshooting message right after that code and it never reached it. The port is coming into the function as a string, as you can see.
Any idea what is wrong here? This is code from a widget where we haven't seen this issue yet so it was working. Scratching my head.
Any help or points to what else I could look at/for would be greatly appreciated!!
THANKS!!!!
Continue reading...
I'm getting the object reference not set to an instance of an object error in teh following code...
private void AddRewriteRule(string port, string avPort, string ruleName, string ruleUrlMatch)
{
using (ServerManager serverManager = new ServerManager())
{
Site site = serverManager.Sites.FirstOrDefault(s => s.Bindings.ElementAt(0).EndPoint.Port == Int32.Parse(port));
string siteName = site.Name;
I think its blowing up at the highlighted code and may have something to do with Int32.Parse. ??
I had a troubleshooting message right after that code and it never reached it. The port is coming into the function as a string, as you can see.
Any idea what is wrong here? This is code from a widget where we haven't seen this issue yet so it was working. Scratching my head.
Any help or points to what else I could look at/for would be greatly appreciated!!
THANKS!!!!
Continue reading...