Bkashani avatar image
0 Votes"
Bkashani asked ryanchill action

Getting error ( POST 500 Internal Server Error) when running Full-Stack Web application in Azure

I have developed a full-stack application with Vue 2, Node , Express and Postgres. I could deploy the application to Azure , and the system coming up, but when I try to do register user with Register page that I have created , I get " POST … 500 (Internal Server Error) ", as I have tried with Postman , there is no issue in saving user data with same post controller .

Notice that I have set BaseURL to ‘’ in Api.js ( Client ):

 import axios from ‘axios’
 import store from ‘@/store/store’
 export default () => {
    return axios.create({
       baseURL: ‘’,
       headers: {
            Authorization: Bearer ${store.state.token}

this is Register controller in /Controller folder :

 //Registering user
 async register(req, res) {
 const hash = bcrypt.hashSync(req.body.password, 10);
      try {
          const user = await User.create(
          Object.assign(req.body, { password: hash })
    const userJson = user.toJSON();
           user: userJson,
           token: jwtSignUser(userJson),
   } catch (err) {
      error: There is error in registering: ${err},

I have added the following web.config file in dist folder, but it doesn't resolve the issue , also I have added web.config in root and has same issue :

       <mimeMap fileExtension="woff" mimeType="application/font-woff" />
       <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> 
                 <clear />
                 <rule name="Redirect to https" stopProcessing="true">
                     <match url=".*" />
                         <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                     <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
           <remove statusCode="404" subStatusCode="-1" />                
           <remove statusCode="500" subStatusCode="-1" />
           <error statusCode="404" path="/survey/notfound" responseMode="ExecuteURL" />                
           <error statusCode="500" path="/survey/error" responseMode="ExecuteURL" />
       <modules runAllManagedModulesForAllRequests="true"/>

Could you please let me know how I could resolve the issue .

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Bkashani,

What's the error that you're getting in the catch?


0 Votes 0 ·

0 Answers