asp.net mvc - Websecurity.CreateUserAndAccount on Azure doesn't work -


i have method registers new user using websecurity.createuserandaccount(model.username, model.password) problem in userprofile model have added guid key. on local machine populates empty guid when call method. on azure however, following error:

   system.data.sqlclient.sqlexception (0x80131904): cannot insert value null column 'key', table 'scheduler.dbo.userprofile'; column not allow nulls. insert fails. 

now, i've tried generate new guid in constructor of model, manually have set{} generate new guid , same error.

when try use createuserandaccount overload like:

 websecurity.createuserandaccount(model.username, model.password, new { key = guid.newguid() }); 

i following syntax error (run time):

 incorrect syntax near keyword 'key'. 

i've spent part of morning trying figure out , can't. way of above methods still result in empty guid 00000000-0000-0000-0000-000000000000 , overload gives me syntax error on local machine.

"key" reserved word in sql, should used in brackets [key]

since don't have control on how websecurity generate sql query option rename userkey


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -