So we have a small basic MVC application that is sitting outside of sitefinity. We are using HttpWebRequest calls to: http://localhost:65353/sitefinitypoc/Sitefinity/Authenticate to authenticate. This returns our security token which I have been able to successfully use to call the Pages service. The code we are using is basically the same as the following blog post:
The problem we are experiencing is that when the MVC application is restarted, we authenticate again because we have lost that security token. The authentication calls returns are new token, however using the new token to make calls to the Pages service fails with:
The remote server returned an error: (403) Forbidden.
Am I missing something fundamental here? How come im getting forbidden with the new token??
As a side note: If I save the token to notepad and retry the request with the original token we have no issues.