locked
Connecting to azure from my ISP RRS feed

  • Question

  • I have a simple asp.net webpage that connects to an azure database, reads a table and returns the names of a table column.  It works on my VS 2103 development environment.  It works on my local instance of IIS, but when I move it to my ISP it returns the following message:

    System.Data.Entity.Infrastructure.UnintentionalCodeFirstException: Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception.   at PhotoDBEntities.OnModelCreating(DbModelBuilder modelBuilder)   at System.Data.Entity.Internal.LazyInternalContext.CreateModelBuilder()   at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)   at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)   at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()   at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)   at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()   at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator()   at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()   at _Default.GetData()

    I have added the ip of my service provider website to the azure managed allowed IP address for the database.  Is there something else that I need to do?

    Thanks


    Robotuner

    Wednesday, March 26, 2014 10:40 PM

Answers

  • I have just found out that the ip that is trying to connect with azure is different from my website ip.

    Problem solved.


    Robotuner

    • Marked as answer by Robotuner Wednesday, March 26, 2014 11:05 PM
    Wednesday, March 26, 2014 11:05 PM