locked
Getting error when trying to view the site on production and test server, but builds fine without complaining RRS feed

  • Question

  • User1324895001 posted

    I have a page that allows you to create new users and modify existing users

    This is the objectdatasource that its complaining about when you try to view the page. Can anyone offer suggestions?

    I have three class files in the app_code directory that deal with this page, but had setup to build into the .dll for the application, am i doing something wrong in calling it? since its in the dll, should it be referenced somewhere or called differently?

    The type specified in the TypeName property of ObjectDataSource 'ObjectDataSourceMembershipUser' could not be found.

                            <asp:ObjectDataSource ID="ObjectDataSourceMembershipUser" runat="server" DeleteMethod="Delete"
                                InsertMethod="Insert"  SelectMethod="GetMembers"                             
                                TypeName="MembershipUtilities.MembershipUserODS" UpdateMethod="Update"
                                SortParameterName="SortData" >
                                <DeleteParameters>
                                    <asp:Parameter Name="UserName" Type="String" />
                                </DeleteParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="email" Type="String" />
                                    <asp:Parameter Name="isApproved" Type="Boolean" />
                                    <asp:Parameter Name="comment" Type="String" />
                                    <asp:Parameter Name="lastActivityDate" Type="DateTime" />
                                    <asp:Parameter Name="lastLoginDate" Type="DateTime" />
                                </UpdateParameters>
                                <SelectParameters>
                                    <asp:Parameter Name="sortData" Type="String" />
                                </SelectParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="userName" Type="String" />
                                    <asp:Parameter Name="isApproved" Type="Boolean" />
                                    <asp:Parameter Name="comment" Type="String" />
                                    <asp:Parameter Name="lastLockoutDate" Type="DateTime" />
                                    <asp:Parameter Name="creationDate" Type="DateTime" />
                                    <asp:Parameter Name="email" Type="String" />
                                    <asp:Parameter Name="lastActivityDate" Type="DateTime" />
                                    <asp:Parameter Name="providerName" Type="String" />
                                    <asp:Parameter Name="isLockedOut" Type="Boolean" />
                                    <asp:Parameter Name="lastLoginDate" Type="DateTime" />
                                    <asp:Parameter Name="isOnline" Type="Boolean" />
                                    <asp:Parameter Name="passwordQuestion" Type="String" />
                                    <asp:Parameter Name="lastPasswordChangedDate" Type="DateTime" />
                                    <asp:Parameter Name="password" Type="String" />
                                    <asp:Parameter Name="passwordAnswer" Type="String" />
                                </InsertParameters>
                            </asp:ObjectDataSource>
    Friday, November 18, 2011 4:51 PM

Answers

  • User3866881 posted

    Hello:)

    Maybe you should remove all files out of App_Code. App_Code is a very special folder, all the classes there shouldn't be entitled with a namespace or soemthing else. All in all, perhaps due to its specification, you should remove it out of the folder.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 19, 2011 10:16 PM

All replies

  • User1042132515 posted

    just cross check the namespace of ObjectDataSourceMembershipUser class and update accordingly in TypeName property.

    also if you are not sure you can first try in your .cs file to access that type.

    Friday, November 18, 2011 11:32 PM
  • User1324895001 posted

    not sure i understand.. cross check it where?

    Friday, November 18, 2011 11:37 PM
  • User1042132515 posted

    Are you able to access MembershipUtilities.MembershipUserODS from you .cs code?

    Saturday, November 19, 2011 6:01 AM
  • User3866881 posted

    Hello cubangt:)

    As far as I see, dll cannot be referred into the ObjectDataSource directly, but you can refer the dll into another class file of cs, and then with the help of it, you can let it referred by ObjectDataSource.

    Best reguards!

    Saturday, November 19, 2011 9:18 PM
  • User1324895001 posted

    well the thing is that there are 3 .cs files used for the membership functionality. All 3 contained within the App_code folder. If i leave them as part of the project(not excluded) everything works, but then the app_code is included in the build and all 3 .cs files are viewable in the Inetpub folder. I have other class files that are contained in another folder and when i build and deploy they get compiled into the .dll and everything works fine.. no .cs files are exposed..

    So i guess my question is how i can accomplish the same thing with the 3 files in the app_code folder?

    Saturday, November 19, 2011 9:46 PM
  • User3866881 posted

    Hello:)

    Maybe you should remove all files out of App_Code. App_Code is a very special folder, all the classes there shouldn't be entitled with a namespace or soemthing else. All in all, perhaps due to its specification, you should remove it out of the folder.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 19, 2011 10:16 PM