This article mainly introduces the steps and methods of enabling developer mode in WeChat development. It has certain reference value. Let’s take a look at it with the editor
Enable developer mode##①Fill in the server configuration
To enable development mode, you need to become a developer first. And you can only choose one of the editing mode and the development mode (enter the WeChat public platform => Development => Basic Configuration) and you can see the following interface:
Click to modify Configuration, the following interface will appear:
Fill in the server address (URL), Token and EncodingAESKey, where the URL is the interface used by developers to receive WeChat messages and events
After the developer submits the information, the WeChat server will send a GET request to the filled in server address URL , the GET request carries four parameters.
# Developers verify the request by checking the signature (the verification method is below). If it is confirmed that this GET request comes from the WeChat server, please return the echostr parameter content as it is, then the access will take effect and become a developer successfully, otherwise the access will fail (Note: WeChat server only supports port 80
Use GET request with the above parameters to request the server, specific implementation code:
public void InterfaceTest() { string token = "配置时填写的token"; string echoString = HttpContext.Current.Request.QueryString["echoStr"]; string signature = HttpContext.Current.Request.QueryString["signature"]; string timestamp = HttpContext.Current.Request.QueryString["timestamp"]; string nonce = HttpContext.Current.Request.QueryString["nonce"]; if (!string.IsNullOrEmpty(echoString)) { HttpContext.Current.Response.Write(echoString); HttpContext.Current.Response.End(); } }
The above is the detailed content of C# WeChat development method to enable developer mode. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver CS6
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
