 |
|
 |
I tried your written steps for deploying asp.net web site to moss2007 but ,I got a error for user controls that "*.Ascx are not allowed here"
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Srivatsan24,
Thanks for your article. I have a question for you - my web application only has 2 files and some images.
The 2 files are an WebGF086.aspx page and an WebGF086.aspx.vb page (web page and code-behind page). That's it.
I am not using any namespaces, so will your method work for me?
My .aspx page begins:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="WebGF086.aspx.vb" Inherits="WebGF086" %>
and my code-behind starts like this:
Partial Class WebGF086 Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Forgive me if I sound very amateur (that's because I am!).
Any help would be greatly appreciated.
Kind Regards, Ashok
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Please put a namespace for your code behind and do whatever is mentioned in the article. Because the keywords codeFile is all visual studio centric. (or if you do not want namespace) just add a web deployment project and compile it to a single assembly. In the aspx page, i think you can just leave the inherits as is. The inherits has the Namespace.classname. So if you dont have a namespace, then just put the class name. But i would advice putting a namespace as it is always a best practice.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Srivatsan,
Thanks for your quick response.
Can you give me an example of how to write a namespace for my 2 files (WebGF086.aspx and WebGF086.aspx.vb) but written in vb please?
Do I need to create a separate file to create the namespace, or do I create it within the WebGF086.aspx.vb file?
Would I have to re-write the code-behind file to something like this for example?
Namespace Ashok
Partial Class WebGF086 Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'The remaining code in my code-behind page...
End Sub
End Class End Namespace
Regards, Ashok
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
you are right about the namespace code. you can also refer any site that will help you in creating a namespace
you have to write it in your .vb file itself.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Srivatsan,
Once again, thank you for your quick reply. I've done the namespace now (seems ok), so thanks.
In step 9 you said:
"Also, we have to allow partially trusted callers for the dependency DLLs. This can be done by opening the Assembly.info file of the Class Library project"
Well, I have no Class Libarary project, so shall I just ignore it?
Regards, Ashok
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Too much words!
Only 4 Steps:
1. Create Web Application Project instead of web site. 2. Sign every project. 3. Every page's Inherits page property like this: Inherits="Default,DllName,Version=,Culture=,PublicKeyToken=". 4. Create a Site Definition Project to deploy.
modified on Thursday, August 13, 2009 12:50 AM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
ok. but what about people who need more explanation. guess a good teacher is one who teaches not only for the brightest in the class but for all. Thanks anyway.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hello,
Thanks for writing a great article. I've successfully migrated a .NET application to a SharePoint site using your instructions.
Once an app is converted in this way, is there an easy way to roll out the functionality to many SharePoint sites? Maybe through a SharePoint custom feature?
Thanks again.
Regards, Scott
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hey man, Great article. Just what I was looking for. Though I am not been able to work this thing out for myself. I have created a website called "foo.com" and a class library "BLL" with namespace "namesp"
(1) In Step1 - 1 When you say "make sure you have proper name space" , could you please give me an example (Is it something what I have given : "namesp.BLL") (2) In Step1 - 3 How would you add strong key name . ( I presume you would add snk to the class lib? which I have done) (3) In Step2 - 4 what should be the entry in the web.config. (4) In Step3 - 10 How would you give "Inherits" in my case.
I have followed the steps but I am constantly getting Pasrser error "Could not load type". If I remove the Inherit tag from the webpage then the page is displayed without error but no data on the page!
I would really appriciate if you can reply to these queries. Also like someone mentioned . If you have a mock code then please put it on the site as it would be extemely useful.
Best Regards
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Following are the answers for your questions Question1: namespace MyCompany.Proj1 { class MyClass { } }
In the above example, the namespace will be MyCompany.Proj1 Question 2: snkey is correct. you have to associate the strong name to the DLL. Your assumption is correct.
Question 3: <SafeControl Assembly="Microsoft.Practices.EnterpriseLibrary.Common" Namespace="Microsoft.Practices.EnterpriseLibrary.Common" TypeName="*" Safe="True" /> This is the sample entry to be entered in web.config
Question 4: In the first namepace example, if the code is compiles as DLL with name SampleDLL, then following is the inherits entry Inherits="MyCompany.Proj1.MyClass,SampleDLL"
I will try to put the code in. Thanks for the feedback.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks Sri for the quick reply. I have tried this but still no luck. it says try to compile the dll etc. I will try further in next few days and see what happens.
Do you think that for the bespoke developement (e.g. accesing custom database etc) best practice is to develope solutions and features?
Many Thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
how can i verify the right namespace and assembly for my project for adding references to my aspx file in a page directive because i got this message: "An error occurred during the processing of . Could not load type 'ExtranetProveedores.NS.ExtranetProveedores.Assembly'. "
thanks !!!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
To verify namespace you can use the .NET disassembler tool. It is usually found in the following location C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ildasm.exe
If you are using the Web deployment setup, then the setup itself will put the required namespace and assembly in the aspx pages. Use a single assembly so that you can refer the same in al the pages.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi srivatsan, I've a question. Could you please provide some info?
In Step 3. Where do i find sharepoint site to import my .net web pages?
Thanks Ram
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
There are two ways of doing this. But i am going to explain the way in which my article suggests (i.e.) importing the site into the Sharepoitn site using Sharepoint designer. 1) Open Sharepoint designer. 2) Click Open Site in the File menu. 3) Type the URL of the Sharepoint site and click Open
This should open your Sharepoint site in the Sahrepoint designer.
Note: Make sure you have site collection admin access to open the Sharepoint site. Also if you are only having forms authentication, then you cannot open the forms authentication URL in the designer. You have to extend the site to Intranet and use windows authentication.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
As you can see in the site that you have mentioned, they have given the pros an cons. The disadvantage of using the iframe is that it is just a view. You are justshowing something in your sharepoint site. you can even open google there. But if you want to use the Sharepoint context, authenticate with sharepoint users ans leverage the capabilities of Sharepoint object model, then you have to use the approach that i have mentioned in my article. It is upto you to decide.
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi mate, thanks for the detailed article. I followed your instructions and it worked first time! It is particularly useful when you have code separation in place i.e. BLL, BOL, DAL in a separate DLL from the website. Not only this but once it is published in SharePoint you still get to edit the style/layout of controls on the pages from within SP Designer without having to re-submit all the DLLs.
I have tried a couple of other approaches but yours is by far the neatest.
Thanks for posting!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
hello, does the same method apply for conversion of a classic asp website to sharepoint site. we dont have a BLL for the concerned application but we do have a data layer.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
i guess it should work. i ahave not done it but the same must work. Try and let me know. Thanks
Srivatsan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hello dear
I create a page in my project
when I don't have any connection to database work true
but when I create a page with sql connection I recieve this error
please give me help for troubleshooting ...
this is my error page ...
__________________________________________
<b>Server Error in '/' Application.</b> --------------------------------------------------------------------------------
Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration> <system.web> <compilation debug="true"/> </system.web> </configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.PermissionSet.Demand() +81 System.Data.Common.DbConnectionOptions.DemandPermission() +55 System.Data.SqlClient.SqlConnection.PermissionDemand() +39 System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +22 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 man.man.Button1_Click(Object sender, EventArgs e) in C:\Users\Administrator\Documents\Visual Studio 2008\Projects\man\man\man\man.aspx.vb:13 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213 System.Web.UI.Page.ProcessRequest() +86 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.c2f7ae50_1c39_4846_97f5_06e56efbd7ea__533470394.ProcessRequest(HttpContext context) +29 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |