Search code examples
mysqlsql-server-2008-r2umbracoumbraco7umbraco6

On submit click getting issue in umbraco


I have one submit click on which the comment get submitted for particular product or thing but on clicking that I am not able to submit that commnet and facing issue as seen in below images enter image description here

enter image description here

Another thing is that this things are working properly in my local host but when I upload it on my beta/staging/Live server I am facing this issue. I have also tried deleting umbraco.config file and log file but still facing same issue

Also on log file I can see the issue as

enter image description here

I have one issue for what i assume both issue are interlink to each other Umbraco on save and publishing showing error

My controller code

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Net;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Web.Mvc;
using Newtonsoft.Json.Linq;
using umbraco;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Web.WebApi;
using xyz.Controls;
using System.Data.SqlClient;
using System.Net.Mail;

namespace xyz.Controllers
{
  public class CommentsController : UmbracoApiController
  {


  }
}

Solution

  • The issue was resolved while going in to Machine.Config of sql server and updating the syntax as

    <connectionStrings>
    <remove name="LocalMySqlServer"/>
    <add name="LocalMySqlServer" connectionString="Datasource=localhost;Database=users;uid=root;pwd=password;"
       providerName="MySql.Data.MySqlClient"/>
    </connectionStrings>