SharePoint Custom Web Service not working for SSL configuration - sharepoint-2007

I did developed a custom SharePoint Web Service . It is working fine when using http. But when we configure SSL(https) , it is not working and throwing the below error.
Request for the permission
of type 'Microsoft.SharePoint.Security.SharePointPermission,
Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bcee11233hj' failed.
Does anyone came accross a similar situation or any ideas on why this is happening?

I was able to solve my problem. It was not this particular Web Service which is causing the problem. It is some other Web Service which is overriding the Config file.
Now everything works fine.

Related

404 error on azure for Asp.Net Web Api Project

I have deployed exact same solution on two servers, one is my own server in my basement and the other one is Microsoft Azure. The project is developed using Asp.Net Web Api 2.
On my own windows server running IIS 8.5 it totally works. For test, you can simply browse this link in your browser and see the error message {"Message":"The requested resource does not support http method 'GET'."} which shows the API has been hit.1
But exact same project on my Azure domain here, you just get a message saying
The resource you are looking for has been removed, had its name
changed, or is temporarily unavailable.
Everything about these two deployments is the same (to the best of my knowledge) and I was wondering if there is any further steps necessary on Web Api app deployment in MS Azure which I am missing.
I finally found the answer to this issue. If there are multiple apps deployed as one single website so each app is located in its own subfolder, you have to go to the configuration section of your web app on Azure and create virtual directories for each of those sub folders.
Ah, my problem was probably a common one. I was using
rootconfig = System.Web.Configuration.WebconfigurationManager.OpenWebConfiguration(null);
and that was returning the root web because the parameter was null.
When I ran it local that worked fine, but after I deployed the root Config was NOT what I wanted and my code was failing.
Switched to direct access via
stringVal = WebconfigurationManager.AppSettings["Foobar"].ToString();
Nice. Plus less overhead.

Getting 200 status code with empty data in web api

i am working with web api and MVC application.
When i run my application, able to see that my all services are running in my local iis
and my request is hitting the api anf getting 200 response back with empty data.
Hear dataservices in my web webconfig
<add key="dataservices" value="https://localhost:44333/" />
Same solution and same changes working in other system. i thought my iis is problem. i repair it also.
can any one help how can i fix
Finally i got the solution for this issue.
Due to remote certificate issue my web is not returning response back.
Remote certificate
Thanks you #stan and #fbiagi for your comments.

HTTP Error 500.22 - Internal Server Error - MVC 5 Application From IIS

I am really stuck with an issue in my MVC 5 application from IIS 7.5 sever. Application works fine in my local developing environment but it failed in server. I am sure that the issue is related to URL routing. I can sea my application home page but if i take some link(Link to any application route(Page)), then IIS is showing 500.22 issues.
I tried many solution to fix this issue.
1- Changed mode from Integrated to Classic
2- Added some patches mentioned in https://support.microsoft.com/en-us/kb/980368
3- validateIntegratedModeConfiguration="false"
Finally i installed MVC in my server machine also. Still no hope. Keep getting 500.22 error in case of route. I added some log writing functionality but i coudn't find any log related to that. In case of routing something else happen from IIS.
I am really stuck with issue. If anyone know any info related to this. then please help me.
Thanks in Advance.

Migrate existing MVC4 app to Azure - 404 not found

I have an existing MVC4 app that I'm trying to port to Azure for experimental purposes. I right clicked the app project and selected Add Azure Project or whatever. I then configured the Azure project settings as necessary and published to Azure.
After doing so, I can access static content just fine at the deployment url, but none of my controllers are responding - I just get a 404 not found error from IIS. What do I need to do to ensure that Azure starts up the ASP.NET bits so my app works correctly?
I ended up resolving the issue by changing the os family from 1 (Windows 2K8 SP2) to 2 (Windows 2008 R2). I'd love to see some documentation on why this fixes the issue, but for now at least it's a solution.
I had this problem when I tried to host my existing MVC application from my local computer to Azure. Please make sure of the following
Allow to run managed modules in the web.config like below
Remove the extensionless handler configuration like commented below
*<system.webServer><modules runAllManagedModulesForAllRequests="true" />
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>*

ASP.NET Azure project does not appear to load newest content items

I have an ASP.NET MVC project and I am testing deployment to Windows Azure via the local emulator. I can run the project file fine in the development server but when I build the Azure project and it launches via the emulator I am having an issue with content files not being returned correctly. My internal CSS and JS files are being re-directed to the login page as if the authorization is failing; however I do not see where this auth requirement would be coming from.
Things I have already tried:
I have manually removed all the build files from both project (I have also tried the "clean" action for the solution)
I have tried removing the Azure project all together and creating a new one from the current version of my project.
I have tried clearing the local storage through the Azure storage interface.
I have verified that all my content is marked as "Content" in my ASP.NET project.
I have tried flagging all of my content items as "Copy always"
I have verified that the Static Content optional feature is checked
EDIT: I did a deploy to the web and everything works great there ... this is an emulator issue it appears. Any suggestions with that new bit of info?
You should verify your web.config just to be sure. Do you see something like this?
<system.web>
<authorization>
<deny users="?" />
</authorization>
...
</system.web>
Did you put the [Authorize] attribute on some of your controllers, or your controller base?
If it works in the cloud and in ASP.NET Development Server, I am not very sure why it doesn’t work in emulator. However I don’t think the issue is related to your application. For now, I would like to suggest you to check your IIS settings, such as applicationHost.config. Please see if there’re any authorization settings that may cause this issue(Compute Emulator uses IIS under the hook to host web roles). Please also try to host the site in a local IIS directly and see if the same issue could be encountered. If you can reproduce this issue in IIS as well, I would recommend you to consider to add a “IIS” tag to this thread, so more IIS experts will provide further suggestions.
Best Regards,
Ming Xu.
This thread has been open for a long time so I wanted to close it with what ended up being the solution.
It ended up being a bug with the emulator and the environment being used. As I mentioned, I was able to get it working when deployed. I actually tried this same situation 6 months later after updating to the latest Azure tool set and it worked fine so I am chalking this up to a bug in the emulator that has since been resolved.

Resources