Hi,
I setup the database on RavenHQ, imported my data, and have no problems in seeing the remote data using Studio.
I created the free website on Azure, and set it up for automatic deployment from my Github account (seems almost too easy!).
I changed my Global.asax to initialize the DocumentStore using the connection string provided by RavenHQ, including the ApiKey.
Problems:
I ran the app locally and immediately got: "No connection could be made because the target machine actively refused it
127.0.0.1:8888". This is probably down to my crap internet connection.
I gave up on trying to run the app locally accessing the remote data, and tried to run it directly from the Azure management page.
I then got an error about being unable to PUT to the replication service. I changed the FailoverBehavior to FailoverBehavior.FailImmediately, published again, and managed to get past this error.
When trying to run the app from Azure I am now getting:
[SocketException (0x271d): An attempt was made to access a socket in a way forbidden by its access permissions 127.0.0.1:8888]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +208
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +464
[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetResponse() +6540964
Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func`1 getResponse) +89
Raven.Client.Connection.HttpJsonRequest.ReadResponseJson() +351
Raven.Client.Connection.ServerClient.DirectPutIndex(String name, OperationMetadata operationMetadata, Boolean overwrite, IndexDefinition definition) +380
Raven.Client.Connection.<>c__DisplayClass5e.<PutIndex>b__5d(OperationMetadata u) +26
Raven.Client.Connection.ReplicationInformer.TryOperation(Func`2 operation, OperationMetadata operationMetadata, OperationMetadata primaryOperationMetadata, Boolean avoidThrowing, T& result, Boolean& wasTimeout) +339
Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication(String method, String primaryUrl, OperationCredentials primaryCredentials, Int32 currentRequest, Int32 currentReadStripingBase, Func`2 operation) +474
Raven.Client.Connection.ServerClient.ExecuteWithReplication(String method, Func`2 operation) +112
Raven.Client.Connection.ServerClient.PutIndex(String name, IndexDefinition definition, Boolean overwrite) +117
Raven.Client.Indexes.AbstractIndexCreationTask.Execute(IDatabaseCommands databaseCommands, DocumentConvention documentConvention) +83
Raven.Client.DocumentStoreBase.ExecuteIndex(AbstractIndexCreationTask indexCreationTask) +43
Raven.Client.Indexes.IndexCreation.CreateIndexes(ExportProvider catalogToGetnIndexingTasksFrom, IDocumentStore documentStore) +126
Raven.Client.Indexes.IndexCreation.CreateIndexes(Assembly assemblyToScanForIndexingTasks, IDocumentStore documentStore) +78
Acp.Production.WebUI.WebApiApplication.CreateRavenIndexes() +33
Acp.Production.WebUI.WebApiApplication.Application_Start() +315
[HttpException (0x80004005): Unable to connect to the remote server]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9916673
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Unable to connect to the remote server]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930568
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
In the configuration panel for the Azure website I have left everything with their defaults.
The Managed Pipeline mode is "Integrated"
I have double checked that the API key in RavenHQ is read/write.
Googling around, this error is because something else has taken the port.
I can't see in Azure WebSite if it is possible to create an endpoint for port:8888.
Do I override the port in my connection string to something else?
I have no real need for replication - the stack trace implies that the problem is something to do with replication.
I then disabled replication in RavenHQ, but I still get the same YSOD.
Any suggestions?
Many thanks in advance,
Jeremy