I am a newby in the beautiful world of Microsoft Azure and made my first hello world website. The next step is to create a database (entityframework) but I get an exception while creating the database from PackageManagerConsole (PMC). I read a few posts on the web that explained that I need to add the startupprojectname to the PS command, but unfortunatelly that doesn't resolve my problem.
I have 2 projects in my solution.
"partyonwebsite" which is the startup project and obviously my website :).
"models" where I will design my models / entities.
In the "models" project I have the classes "User" and "UsersDb". UsersDb is the class that inherits from DbContext.
Now, when I execute the following line in PMC:
enable-migrations -StartUpProjectName "PartyOnWebsite" -ContextTypeName "Models.Users.UsersDb"
I receive the following (not very helpful) error:
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
I've had a look at get-help enable-migrations and played around a bit but not a lot of luck.
Did anybody bump into the same problem? Or can you point me in the right direction to help me solve it?
Thanks a lot in advance!
Bas
Solved. If you run into the same problem, make sure that EntityFramework is setup correctly for your seperate "Models" project.
Open "Manage NuGet packages for solution" in solution explorer (right click solution in solution explorer)
Select "Installed packages"
Select "EntityFramework" and click "Manage"
Check your "Models" project (I checked both my website project and the "models" project)
Run your enable-migrations command again.
I also added a project reference from my Website project to the Models project, I don't know if that matters.
The command that successfully executed after my adjustments in NuGet:
enable-migrations -ProjectName Models -ContextTypeName Models.Users.UsersDb
Hope this answer helps another lost soldier in his path to get his first app running in Azure :).
Cheers,
Bas
Related
After following the tutorial steps from this video:
https://www.youtube.com/watch?v=kOoQJDeTlJ0
and clicking on the final button to visit newly created website, I get the following error:
http://dnndev.me/Default.aspx?tabid=59&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0
I have tried it several times, and also tried following steps from some other tutorials, but the error would persist. However when I tried to install it on different computer, it worked just fine.
I found possible solution here:
Dotnetnuke Site settings PageLoadException: Object reference not set to an instance of an object
but I just don't know how to access that stored procedure that he metioned as I am new to dnn.
Can anybody help me with this please?
I would start by looking at the EventLog and Exceptions table in the database to see if you can get a more detailed error.
select * from eventlog order by logcreatedate desc
Select * from exceptions
Did you do anything else, such as create a module project, before you ran through the installation process with DNN?
I have created a sample WPF project, worked fine.
I added a MVVMLight project, made it a default startup project, and ran fine.
Now I added a class library project, and added an ADO.NET data model with "Code First From Database", and selected relevant tables, that gave me a good collection of entity classes.
I thought this way, I can keep my data model seperate from presentation and businesss logic layers, plus add additional target plateforms if needed and take the advantage of SoC.
So far so good.
Now I want to enable Migrations on my data layer only. I fired up Nuget console, selected dataLayer project in the "Default Project" drop down. Issued Enable-Migrations command and very first error I got was
"No connection string named 'dpFinDataModel' could be found in the application config file."
Now I modified Startup project - i.e. Mvvm project's App.Config to add App.Config details from DataLayer project.
Tried to rerun "Enable-Migrations", and following error occured:
PM> Enable-Migrations
The project 'dpFinMvvm' failed to build.
Am I doing something wrong here?
Will this approach work?
Thanks for all your help.
-DP
1) PM> Enable-Migrations would get an error if your project itself contains errors.
Try going through your code such as in debug mode and check if you have any build errors then try.
2) And for your config file error you may have not referenced it properly, try this tutorial to solve your issue.
http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application
I am striving to get the source of my issue but no luck. I did check almost all suggestions to fix this problem when publishing project (publishing using right-click, checked DevExpress is not installed).
-Regarding DevExpress the application have some of it's assemblies.
- Cannot publish because a project failed
- Could not find file 'obj\x86\Debug\MyApplication.exe'
I did send publishing diagnostic to the Output and get this :
Task "GenerateApplicationManifest" (TaskId:158)
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2580,9): error MSB3113: Could not find file 'obj\x86\Debug\MyApplication.exe'.
Done executing task "GenerateApplicationManifest" -- FAILED. (TaskId:158)
Done building target "GenerateApplicationManifest" in project "MyApplication.csproj" -- FAILED.: (TargetId:194)
Can someone list all things I have to check to get this issue fixed ?
I just ran into the problem today. In my particular case, it was caused by this Microsoft Windows Update.
I uninstalled that update and publish began working as it always had. This is only a temporary work around and means you should probably regenerate your keys/certificates.
Right click on you Project
Click Publish
Go to Settings Tab
Click File Publish Options
Check All the options in the tab (As seen in attached image)
I'm trying to fix a broken SSP on a MOSS 2007 site. The problem I am running into manifests itself as follows...
In the SSP "Search Settings" page I get this message:
The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.
In the SSP "User Profiles and Properties" page I get this in red at the top:
An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator.
I have contacted my administrator, but that is currently me and it turns out I don't know any more than I do about the problem.
In the Event Log I get the following message:
The Execute method of job definition Microsoft.Office.Server.Search.Administration.IndexingScheduleJobDefinition (ID 8714973c-0514-4e1a-be01-e1fe8bc01a18) threw an exception. More information is included below.
Search application '{0}' is not ready.
The Event ID is 6398, which isn't as useful as I had hoped, but I don find the message interesting in that it looks like a String.format call where the substituted value is missing. Unfortunately no interesting in that it tells me how to fix the problem.
Sharepoint's own log offers this:
UserProfileConfigManager.GetImportStatus() failed to obtain crawl status: System.InvalidOperationException: Search application '{0}' is not ready.
at Microsoft.Office.Server.Search.Administration.SearchApi..ctor(WellKnownSearchCatalogs catalog, SearchSharedApplication application)
at Microsoft.Office.Server.Search.Administration.SearchSharedApplication.get_SearchApi()
at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.c__DisplayClass3.b__0()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
I have tried stopping and starting the search service, removing and re-adding it from the administration panel, and pretty much every other thing I could find to do with Sharepoint's own administrative tools, which leads me to believe the problem here may be database or permissions related.
There was a second SSP set up on the same server, which I think may have been part of the original cause of the problem, but removing it has made no difference.
Maybe you can make sense of this - I'm new to sharepoint, so it makes little sense to me:
"Service Shared, after looking for the solution much encontre this forum where a person tapeworm the same problem. After reading a infinity of commentaries, which I made to solve the problem was to create a new shared service, later it assigns the other applications to him and later I put it like predetermined, it initiates the import of profiles, and later the hearings, clearly first I did it in a site of tests just in case something happened, later eliminates the First Shared Service and finally the error I am solved. The snapshot of the Registry of the configuration of the application in the data base has been stored correctly. Context: application `SharedServices2 ′"
You didn't mention anything about tapeworms, so maybe you're running a newer version.
Translation of:
http://tecnologiainformaticait.wordpress.com/2008/11/21/error-sharepoint-search-application-0-is-not-ready/
Personally, I'd try the msdn forums.
So it seems that the problem was a corrupted Shared Service Provider ( no idea how it came about, but there you go ) and the only working solution I could find was to delete it and start again.
I suspect there may have been a more elegant fix by changing something in the database somewhere, but I don't know the Sharepoint Database model well enough to find it in the time available.
As an additional warning to this, if you do delete your SSP you may find that it doesn't delete cleanly so that you get a bunch of SQL server tasks that still try to run on an empty database, which can cause problems if you have anything else running on the same database server.
Same problem. My DBA delete correctly the search database and it still doesn't work.
I'll post the solution on my blog when I found something.
For the moment, we open a MS call.
Created a new SSP
2- In central admin, click on shared Services Administration
3- Click on "Change Associations" and move all the web apps to the new SSP
Choose a new search_DB and select the good server that will index if you are in a farm
Problems created by this operation:
We notice that we lose statistics information for our sites.
if you tried this solution, give us your feed back too
Thanks.
http://dejacquelot.blogspot.com/
I'm following this tutorial : https://netbeans.org/kb/docs/web/mysql-webapp.html
All is working until this :
The two resources don't display in each category.
I have still continued the tutorial and i get this error :
javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "java.sql.SQLException: No suitable driver found for
jdbc/IFPWAFCAD"
I have added the Connector in the libraries...
Can someone help ?
We had this tutorial assigned as a class exercise and we all ran into the same problem. Something with updates puts the "glassfish-resources.xml" in the WEB-INF section of your project. Left-click and drag this file into your "Server Resources" folder then right-click on your project folder. You should now see the jdbc/IFWAFCAD in the JDBC Resources and IfpwafcadPool in the JDBC Connection Pools of your GlassFish Server Resources.
I also had followed this document and got a similar error. Because of, I was wrong with "Referencing the data source from the application"."For Resource Name, enter the resource name that you gave when configuring the data source for the server".
I could run successfully after correct it.